RQ¶
RQ is for Redis Queue deployments where selected Wove tasks should run in an existing Python worker queue.
Use When¶
Your project already runs RQ workers.
A simple Redis-backed queue is enough for the task.
Workers can import Wove and application code.
Execution Shape¶
Wove enqueues
wove.integrations.worker.run(payload).An RQ worker executes that function.
The worker posts Wove completion events back to the callback URL.
Dependency¶
Install dispatch support and RQ in the submitting process and in RQ workers.
pip install "wove[dispatch]" rq
Configure Wove¶
import wove
wove.config(
default_environment="rq",
environments={
"rq": {
"executor": "rq",
"executor_config": {
"redis_url": "redis://redis:6379/0",
"queue_name": "wove",
"callback_token": "shared-secret",
"callback_url": "https://wove-runner.internal/wove/events/shared-secret",
},
}
},
)
You can pass an existing RQ queue as executor_config["queue"]. If queue is omitted, Wove creates one from redis_url and queue_name.
Worker¶
Start a normal RQ worker against the same queue.
rq worker wove
Options¶
Key |
Effect |
|---|---|
|
Existing RQ queue. |
|
Redis URL used when Wove creates the queue. |
|
Queue name. Defaults to |
|
Extra keyword arguments passed to |