A Django Tasks backend which uses RQ as its underlying queue
Project description
Django Tasks RQ
A Django Tasks backend which uses RQ as its underlying queue.
Installation
python -m pip install django-tasks
First, add django_tasks_rq to your INSTALLED_APPS:
INSTALLED_APPS = [
# ...
"django_tasks_rq",
]
Finally, add it to your TASKS configuration:
TASKS = {
"default": {
"BACKEND": "django_tasks_rq.RQBackend",
"QUEUES": ["default"]
}
}
Usage
The RQ-based backend acts as an interface between Django's tasks interface and RQ, allowing tasks to be defined and enqueued using django.tasks, but stored in Redis and executed using RQ's workers.
Any queues defined in QUEUES must also be defined in django-rq's RQ_QUEUES setting.
Job class
To use rq with django-tasks-rq, a custom Job class must be used. This can be passed to the worker using --job-class:
./manage.py rqworker --job-class django_tasks_rq.Job
Priorities
rq has no native concept of priorities - instead relying on workers to define which queues they should pop tasks from in order. Therefore, task.priority has little effect on execution priority.
If a task has a priority of 100, it is enqueued at the top of the queue, and will be the next task executed by a worker. All other priorities will enqueue the task to the back of the queue. The queue value is not stored, and will always be 0.
Contributing
See CONTRIBUTING.md for information on how to contribute.
Note: Prior to 0.12.0, this backend was included in django-tasks. Whilst the commit history was cleaned up, it's still quite messy. Don't look too closely.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_tasks_rq-0.12.0.tar.gz.
File metadata
- Download URL: django_tasks_rq-0.12.0.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84020a65d7b92d867f28d3002b4a6b07514eeda99b880ad91bb041d63e2191e0
|
|
| MD5 |
06a3d0a2164e8201087bdcc1f47e40e4
|
|
| BLAKE2b-256 |
30d3c964bd32d2fc5df173c49eaab418784034baaf66cfa84ce9be44e7073e2b
|
Provenance
The following attestation bundles were made for django_tasks_rq-0.12.0.tar.gz:
Publisher:
ci.yml on RealOrangeOne/django-tasks-rq
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_tasks_rq-0.12.0.tar.gz -
Subject digest:
84020a65d7b92d867f28d3002b4a6b07514eeda99b880ad91bb041d63e2191e0 - Sigstore transparency entry: 924453896
- Sigstore integration time:
-
Permalink:
RealOrangeOne/django-tasks-rq@fefcb02697c47c68bcd9d81ffae395abcf8bd4d2 -
Branch / Tag:
refs/tags/0.12.0 - Owner: https://github.com/RealOrangeOne
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@fefcb02697c47c68bcd9d81ffae395abcf8bd4d2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_tasks_rq-0.12.0-py3-none-any.whl.
File metadata
- Download URL: django_tasks_rq-0.12.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ece4131fb31bd0410a958504c4491e81a4987eddd654b9b26311af96a743ba0d
|
|
| MD5 |
0d1b199b4cceb7bcc6aa94f77e248445
|
|
| BLAKE2b-256 |
33dd7cdc12b0ce24be13ecd6088c8baa2da4fa7e5b70c6f763570f0b0b750cbe
|
Provenance
The following attestation bundles were made for django_tasks_rq-0.12.0-py3-none-any.whl:
Publisher:
ci.yml on RealOrangeOne/django-tasks-rq
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_tasks_rq-0.12.0-py3-none-any.whl -
Subject digest:
ece4131fb31bd0410a958504c4491e81a4987eddd654b9b26311af96a743ba0d - Sigstore transparency entry: 924453898
- Sigstore integration time:
-
Permalink:
RealOrangeOne/django-tasks-rq@fefcb02697c47c68bcd9d81ffae395abcf8bd4d2 -
Branch / Tag:
refs/tags/0.12.0 - Owner: https://github.com/RealOrangeOne
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@fefcb02697c47c68bcd9d81ffae395abcf8bd4d2 -
Trigger Event:
push
-
Statement type: