Skip to main content

Dead simple async task queue. Stores tasks in database. No overhead infrastructure required just for throwing something off process.

https://github.com/wooyek/django-tasker

https://img.shields.io/travis/wooyek/django-tasker.svg https://img.shields.io/coveralls/wooyek/django-tasker.svg https://img.shields.io/pypi/v/django-tasker.svg?maxAge=2592000 https://img.shields.io/pypi/dm/django-tasker.svg?maxAge=2592000 https://img.shields.io/pypi/pyversions/django-tasker.svg

Usage

You are free to make task from function or class and instance methods. No boilerplate functions are required to wrap task logic.

With django models instances tasks will remember an instance primary key, load an instance and call a method.

class SomeModel(models.Model):
    ...

    @queueable
    def update_this_instance(self, *args, **kwargs):
        ...

    def must_do_something(self):
        ...
        self.update_this_instance.queue()
        ...

With plain old class object tasks will call it’s classmethod. Normal functions are also supported.

class PocoClass(Object):

    @queueable
    def do_stuff_with_models(cls, limit):
        ...

@queueable
def background_job(cls, with_this, and_that):
    ...

PocoClass.do_stuff_with_models.queue(10)
background_job.queue(foo, bar)

Limited support for arguments serialization

Call arguments are supported as long as they are json serializable and they’re serialized up to a TaskInfo.payload fields max_length. We don’t wan;t to be holding too much information, preferably models instances are holding just enough information for parametrize task execution.

Why not Celery?

Celery is great! But it’s sometimes an overkill. It’s a full-on messaging implementation with all the bells and whistles you need for sending tasks to some worker and getting a result back.

Maintaining all that infrastructure just to send an email every couple of request seems a bit too much.

Why not RQ?

Python-RQ is super. But it need’s Redis. It’s fine when your background work does not pile up. Using Redis to hold gigabytes of task data is like burning money.

Why DB as storage?

Because you already have it, it’s the simplest storage to use. And with fanout resulting in millions of tasks the only cheaper storage is disk.

Why not fire up more workers?

Sometimes you just can’t crunch task quick enough, for eg. because of the API throttling limits. It’s more sensible to store them and spread execution in time.

Metadata

Release files for django-tasker 0.2.60

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-tasker 0.2.60
File Size Uploaded
django-tasker-0.2.60.tar.gz 13.5 kB Details

Release files / django-tasker-0.2.60.tar.gz

Download URL django-tasker-0.2.60.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6d7a97536b55029a089304445727ed5f68b9a21a7a8b6eb9b3475dc53835cbc1
BLAKE2b-256 checksum
How to use checksums
f253fb7caf38f06f4e3a1a4b873b45e2e975fb189d49d7ad594c9a2599b6a8c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/2.7

Release history Release notifications | RSS feed

This release

0.2.60 This release

1 release file

0.2.59

1 release file

0.2.58

1 release file

0.2.57

1 release file

0.2.56

1 release file

0.2.55

1 release file

0.2.54

1 release file

0.2.53

1 release file

0.2.49

1 release file

0.2.48

1 release file

0.2.47

1 release file

0.2.46

1 release file

0.2.45

1 release file

0.2.44

1 release file

0.2.43

1 release file

0.2.42

1 release file

0.2.41

1 release file

0.2.40

1 release file

0.2.39

1 release file

0.2.38

1 release file

0.2.37

1 release file

0.2.36

1 release file

0.2.35

1 release file

0.2.34

1 release file

0.2.33

1 release file

0.2.32

1 release file

0.2.31

1 release file

0.2.30

1 release file

0.2.29

1 release file

0.2.28

1 release file

0.2.27

1 release file

0.2.26

1 release file

0.2.25

1 release file

0.2.24

1 release file

0.2.23

1 release file

0.2.21

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page