Skip to main content

z4j-celery

PyPI version Python License

The Celery engine adapter for z4j.

Streams supported task lifecycle events from your Celery workers to the z4j brain and accepts operator control actions from the dashboard. Pair with z4j-celerybeat to manage periodic / cron schedules.

Compatibility

  • Celery 5.2.2+ (no upper cap)
  • Python 3.11+

Full per-adapter matrix at https://docs.z4j.com/reference/compatibility/.

What it ships

Capability Notes
Task lifecycle events received, started, succeeded, failed, retried, revoked
Task discovery runtime registry merge + static tasks.py scan
Submit / retry / cancel direct against the Celery app
Bulk retry retries brain-selected explicit task IDs individually; does not sweep the broker
Purge queue with confirm-token guard
Requeue dead-letter unsupported: broker-specific atomic consume/ack and routing are required
Restart worker fire-and-forget pool_restart; requires Celery's worker_pool_restarts setting and operator verification
Pool grow / shrink via Celery's control API
Rate limit fire-and-forget Celery remote-control broadcast to the selected worker(s)
Reconcile task via the result backend

The widest feature coverage of any z4j engine adapter, Celery's remote-control surface provides controls other engines cannot expose. Worker-control broadcasts do not acknowledge execution: verify the worker state afterward. pool_restart is intended for prefork deployments; Celery's gevent and eventlet pools do not support it reliably.

Install

pip install z4j-celery z4j-celerybeat

Pair with a framework adapter:

pip install z4j-django  z4j-celery z4j-celerybeat   # Django
pip install z4j-flask   z4j-celery z4j-celerybeat   # Flask
pip install z4j-fastapi z4j-celery z4j-celerybeat   # FastAPI
pip install z4j-bare    z4j-celery z4j-celerybeat   # framework-free worker

Pairs with

  • z4j-celerybeat, schedule adapter for Celery Beat / django-celery-beat

Retry prerequisites

Retry uses original arguments from Celery's result backend when available. Enable result_extended=True (CELERY_RESULT_EXTENDED=True with Django's CELERY namespace) to store them, and configure a result backend. Those original values are stored outside z4j's redaction layer; apply the backend's access and retention controls. If arguments are unavailable, provide both args and kwargs explicitly. The adapter refuses to replay a task using incomplete or redacted arguments.

Reliability

  • Lifecycle-capture failures are isolated from Celery workers and signal handlers; capture hooks make no brain network request inline.
  • The in-process event queue and SQLite outbound buffer are bounded. A full queue evicts its oldest queued event to admit the new one, up to three times. Queue overflow drops new events only if that cannot make room. Buffer pressure evicts oldest rows. Every loss is logged.

Documentation

Full docs at docs.z4j.com/engines/celery/.

License

Apache-2.0, see LICENSE.

Metadata

Release files for z4j-celery 1.13.0

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

Source distribution (sdist)

Source distribution for z4j-celery 1.13.0
File Size Uploaded
z4j_celery-1.13.0.tar.gz 81.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for z4j-celery 1.13.0
File Interpreter ABI Platform
z4j_celery-1.13.0-py3-none-any.whl Python 3 none any Details

Total release size: 153.8 kB

Release files / z4j_celery-1.13.0.tar.gz

Download URL z4j_celery-1.13.0.tar.gz
Size 81.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2d2cdc3d0767971e39fa78ce8a80f7ba6911713cdc133cc712f3ce9320b1c0d6
BLAKE2b-256 checksum
How to use checksums
84b3a004863c93b5a475a18866d2315e413330be3d7825c0bc4ef8ff5544fc4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / z4j_celery-1.13.0-py3-none-any.whl

Download URL z4j_celery-1.13.0-py3-none-any.whl
Size 72.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7804dbef232126dcd3aedf327273266860234fbf8f0af31f5066b9a582cc72d2
BLAKE2b-256 checksum
How to use checksums
c8bcfc03fd44e762d4fbf64c0e406b6ba580e356e6b8f98f977a4e47ce79f79b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

1.13.0 This release

2 release files

1.11.0

2 release files

1.10.0

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.7

2 release files

1.6.6

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.1.2

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

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