Registry / workflow / rq
library2.11.0pypypi✓ verified 27d ago

Simple Python job queue backed by Redis or Valkey. Current version is 2.7.0. Requires Python >=3.9, Redis >=5 or Valkey >=7.2. Much simpler than Celery — no broker config, just a Redis connection. Key API change: job.result property removed in 1.12, replaced by job.return_value(). job.get_status() now returns a JobStatus enum, not a string.

pip install rq
INSTALL
IMPORT
SIG · RQ
R
rq
workflowpythonv2.11.0
Install
2.6s avg
Import
547ms
Disk
25MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.11.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.592s · 26.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.6s · import 0.502s · 27MB
25MB installed
● package 25MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Queue
from rq import Queue
from redis import Redis from rq import Queue
Worker
from rq import Worker
JobStatus
from rq.job import JobStatus

Start Redis first, then run worker: rq worker. Functions must be in importable modules.

# tasks.py — functions must be in an importable module def add(x, y): return x + y def send_email(to, subject, body): # ... email logic return True # enqueue.py — enqueue jobs from redis import Redis from rq import Queue from tasks import add redis_conn = Redis() q = Queue(connection=redis_conn) # Enqueue job = q.enqueue(add, 4, 6) print('Job ID:', job.id) # Enqueue with options job2 = q.enqueue( add, 10, 20, job_timeout=300, # seconds before job is killed result_ttl=500, # seconds to keep result in Redis retry=3 # retry on failure ) # Check result (after worker runs) import time time.sleep(1) print(job.return_value()) # 10 print(job.get_status()) # JobStatus.FINISHED # --- Start worker in separate terminal --- # rq worker
rq --version
Debug
Known issues
breakingjob.result property removed in rq 1.12.0. Accessing job.result raises AttributeError. All tutorials and LLM-generated code using job.result are broken.
fix
Replace job.result with job.return_value(). Note it returns None until the job completes.
affects: >= 1.12
breakingjob.get_status() returns a JobStatus enum (e.g. JobStatus.FINISHED) not a string ('finished'). Comparing with strings like if job.get_status() == 'finished' always evaluates to False.
fix
from rq.job import JobStatus; if job.get_status() == JobStatus.FINISHED: ... Or use job.is_finished, job.is_failed, job.is_started properties.
affects: >= 1.0
breakingPython 3.8 support dropped. Minimum is Python 3.9.
fix
Pin rq<2.0 for Python 3.8 environments.
affects: >= 2.x
breakingredis-py 6.0.0 is explicitly blocked — rq will refuse to install with redis==6.0.0 due to critical incompatibilities. Use redis>=4.0.0,!=6.0.0.
fix
Pin redis!=6.0.0 in requirements. Use redis>=4.0.0,!=6.0.0 or upgrade to a later redis-py patch once fixed.
affects: all
gotchaEnqueued functions must be importable by the worker process. Functions defined in __main__ or interactively (notebooks, scripts run directly) cannot be pickled and will raise PicklingError.
fix
Define task functions in separate module files (e.g. tasks.py). The worker imports them by module path.
affects: all
gotchaWorkers must be started in a separate process. Running rq worker in the same process as enqueuers causes deadlocks. Workers run: rq worker [queue_name]
fix
Start worker in a separate terminal: rq worker. Or use WorkerPool for multiple workers: from rq import WorkerPool; WorkerPool(queues=[q], connection=redis_conn).start()
affects: all
gotchaOn Windows and macOS, the default Worker uses fork() which is not available. Use SpawnWorker instead, which uses multiprocessing.spawn.
fix
from rq import SpawnWorker; SpawnWorker(queues=[q], connection=redis_conn).work(). Or use SimpleWorker for testing (no fork/spawn, runs in-process).
affects: >= 1.16
Upgrade
Version history
2.11.0latest on PyPI · released Aug 17, 2026
Audit
Dependencies
redis>=4.0.0,!=6.0.0requiredRequired. redis-py 6.0.0 is explicitly blocked due to bugs. Installed automatically.
click>=5.0requiredRequired for CLI. Installed automatically.
Agent activity
41 hits · last 30 days
node
34
OpenAI (training)
3
Resources
rq — pip install rq · libregistry