djanquiltdb-plugin-celery
DjanQuiltDB shards a database across schemas and nodes. This library provides Celery tasks that run in the shard that they are sent to, and that are retried while that shard is in maintenance:
from djanquiltdb.decorators.celery import shared_task_for_shard
@shared_task_for_shard
def send_invoice(invoice_id):
Invoice.objects.get(pk=invoice_id).send()
send_invoice.for_shard(shard).delay(invoice_id=12)
send_invoice.delay(invoice_id=12, tenant_slug='acme')
The shared_task_for_* decorators create a shared task, as celery.shared_task() does. The task_for_* methods of a QuiltCelery app create a task of that app, as app.task() does:
from djanquiltdb.base.celery import QuiltCelery
app = QuiltCelery('myproject')
@app.task_for_shard
def send_reminder(invoice_id):
Invoice.objects.get(pk=invoice_id).send_reminder()
A task that is decorated with shared_task_for_node runs in the public schema of the node that its node_name identifies. A task that is decorated with shared_task_for_active_shard runs in the shard that is active where the task is sent. A task that is decorated with shared_task_for_every_shard runs once in every active shard when it is sent without a shard:
from djanquiltdb.decorators.celery import shared_task_for_every_shard
@shared_task_for_every_shard(queue='fanout', spread=(0, 300))
def clean_up_drafts():
Draft.objects.filter(updated_at__lt=a_month_ago()).delete()
clean_up_drafts.delay()
Install the plugin through the celery extra of DjanQuiltDB:
pip install djanquiltdb[celery]
Full documentation is at https://djanquiltdb.readthedocs.io/en/latest/plugins/celery/index.html.
Development
This package is developed in the DjanQuiltDB repository beside djanquiltdb itself. Tests run through tox against the Postgres containers in the repository’s docker-compose.yml; see DOCKER.md at the repository root:
docker compose run --rm test tox
Requirements
Python 3.14
Django 6.0 or 6.1
PostgreSQL 17 or 18
djanquiltdb 4.4.0 or newer 4.x
Celery 5.6 or newer 5.x
Metadata
Release files for djanquiltdb-plugin-celery 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| djanquiltdb_plugin_celery-1.1.0.tar.gz | 57.4 kB | With provenance | Details for djanquiltdb_plugin_celery-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| djanquiltdb_plugin_celery-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for djanquiltdb_plugin_celery-1.1.0-py3-none-any.whl |
Total release size: 84.1 kB
Release files / djanquiltdb_plugin_celery-1.1.0.tar.gz
| Download URL | djanquiltdb_plugin_celery-1.1.0.tar.gz |
|---|---|
| Size | 57.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0538fcd1653a4baec4a7bdba265f5b20505ebf371e69439000eedc3b657f5434
|
|
BLAKE2b-256 checksum How to use checksums |
108c6baadc8d708b65a063d62bf91d7c4d082cd7bc4d4630f758b1c1f5026cc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logRelease files / djanquiltdb_plugin_celery-1.1.0-py3-none-any.whl
| Download URL | djanquiltdb_plugin_celery-1.1.0-py3-none-any.whl |
|---|---|
| Size | 26.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d3fa5d406d70f1fe32e14b2a6fe16579c822a294e077616c98a25edd5bcd6a95
|
|
BLAKE2b-256 checksum How to use checksums |
1e7fb674a3666ec06ef045c7237ef9fc7dd7099ff43a9e4168c7fd3f532e819f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logSecurity for djanquiltdb-plugin-celery 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for djanquiltdb_plugin_celery-1.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.