Skip to main content

A simple Celery-like transactional task queue for Django

Project description

A short and simple Celery replacement for my Django projects.

  • Database is the only backend. The task is a simple Django model, it uses the same transaction and connection as other models. No more transaction.on_commit hooks to schedule tasks.

  • Tasks do not produce any results and there is no “result backend”. If you need to store results, pass a unique key into the task and store the result in some DIY model.

  • You can not wait on the response from the task, there is no get or join to get the task result. I think a thread pool or process pool is better for those requirements.

  • No workflows and chaining of jobs.

  • ETA (estimated time of arrival) is a first-class citizen. It does not depend on whether backends support the feature or not.

  • The worker is a single-threaded process, you start several of those to scale. I have seen too many issues with autoscaling workers, worker processes killed by OS, workers stuck: simple is better.

  • No prefetching or visibility timeouts. The worker picks the first available task and processes it.

  • Dead letter queue built in. You get access to failed tasks and can retry them.

  • Django admin for monitoring. You can view pending tasks, failed, and “dirty” (crashed in the middle of work). Failed and “dirty” tasks can be retried from the same Django admin.

  • Easy to get the metrics from Django shell and export to your favorite monitoring tool

  • Task records are removed after successful execution. Unlike Celery SQLAlchemy’s backend, records are removed so you don’t have to care about archiving. It also keeps the table small, properly indexed and efficient.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_transactional_task_queue-0.1.5.tar.gz (8.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page