z4j-rq
The RQ engine adapter for z4j.
Streams supported RQ job lifecycle events from your workers to z4j and accepts operator control actions from the dashboard. Pair with z4j-rqscheduler to manage periodic schedules.
Compatibility
- RQ 1.10.1+ (no upper bound)
- Python 3.11+
Full per-adapter matrix at https://docs.z4j.com/reference/compatibility/.
What it ships
| Capability | Notes |
|---|---|
| Job lifecycle events | started, succeeded, failed (a stopped job is reported as failed; revoked only through the opt-in capture_stopped job callback) |
| Job discovery | task names observed in recent jobs on each known queue and in its started, finished and failed registries |
| Submit / retry / cancel | direct against the RQ queue |
| Bulk retry | retries brain-resolved, project-owned explicit IDs by reference; never sweeps the broker-wide failed registry |
| Purge queue | with confirm-token guard |
| Reconcile task | via Redis-backed job hash lookup |
Install
pip install z4j-rq z4j-rqscheduler
Pair with a framework adapter:
pip install z4j-django z4j-rq z4j-rqscheduler # Django
pip install z4j-flask z4j-rq z4j-rqscheduler # Flask
pip install z4j-fastapi z4j-rq z4j-rqscheduler # FastAPI
pip install z4j-bare z4j-rq z4j-rqscheduler # framework-free worker
Pairs with
z4j-rqscheduler, schedule adapter for rq-scheduler
Reliability
-
For POSIX fork workers, select the memory-corrected worker through RQ's standard CLI extension point:
rq worker --worker-class z4j_rq.worker.Worker default
Keep your existing queues, Redis options, settings module and z4j startup integration. In Python, import
Workerfromz4j_rq.workerinstead ofrq. The worker sets each job's environment only in its child process, preventing the parent-side native allocation growth reproduced with stock RQ on glibc. RQ retains execution, monitoring, timeout, retry and shutdown handling; the RQ 1.x session and RQ 2.x process-group behavior are preserved. -
Selecting this class is explicit. Installing the adapter alone does not replace stock or custom workers.
SimpleWorker,SpawnWorkerand Windows workers are outside this fork-worker repair. If you retain an affected stock fork worker, use--max-jobs 50000with a process manager configured to restart successful exits. Normal supervision and application memory limits remain useful with either worker. -
Lifecycle-capture failures are isolated from RQ workers and job hooks; 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/rq/.
License
Apache-2.0, see LICENSE.
The fork boundary adapted from RQ retains its BSD-2-Clause notice in
RQ_LICENSE, included in the installed package.
Links
- Homepage: https://z4j.com
- Documentation: https://docs.z4j.com
- PyPI: https://pypi.org/project/z4j-rq/
- Issues: https://github.com/z4jdev/z4j-rq/issues
- Changelog: CHANGELOG.md
- Security: security@z4j.com (see SECURITY.md)
Metadata
Release files for z4j-rq 1.13.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 | |
|---|---|---|---|
| z4j_rq-1.13.0.tar.gz | 72.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| z4j_rq-1.13.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 133.9 kB
Release files / z4j_rq-1.13.0.tar.gz
| Download URL | z4j_rq-1.13.0.tar.gz |
|---|---|
| Size | 72.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9532852a76a57afe8c0851b01164bae7e28da58b1099640fc10637d11c1dbe9d
|
|
BLAKE2b-256 checksum How to use checksums |
6ad2373922a9a36c897707a8cb23cd585ca4723d2111870829cafbc82b90774d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / z4j_rq-1.13.0-py3-none-any.whl
| Download URL | z4j_rq-1.13.0-py3-none-any.whl |
|---|---|
| Size | 61.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
58b1220a126f335df3515823532551a6675d7aba201dc036f625f4cea1f6abee
|
|
BLAKE2b-256 checksum How to use checksums |
f00ab9f376f6ffd6911b6702ddd1446d61e5bb7844532e9fbed77e92e4b7dff9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|