@@ -23,9 +23,9 @@ The worker is a standalone Rust-powered process (invoked through the `fluxqueue`
2323- Pulls tasks from Redis and executes the corresponding Python functions
2424- Handles retries and optionally preserves dead tasks for debugging
2525
26+ <!-- prettier-ignore -->
2627!!! tip
27- In development, you will usually run the worker through the dedicated Python CLI (` fluxqueue-cli ` ), which exposes a Python-friendly interface:
28-
28+ In development, you will usually run the worker through the dedicated Python CLI (` fluxqueue-cli ` ), which exposes a Python-friendly interface:
2929 ```bash
3030 fluxqueue start --tasks-module-path myapp.tasks --queue default
3131 ```
@@ -213,18 +213,21 @@ This separation lets you:
213213For each worker process:
214214
215215- ** Executors** :
216- - One per ` --concurrency ` slot.
217- - Each has a unique executor ID.
218- - Registers itself in Redis and pulls tasks.
216+ - <!-- prettier-ignore -->
217+ - One per ` --concurrency ` slot.
218+ - Each has a unique executor ID.
219+ - Registers itself in Redis and pulls tasks.
219220
220221- ** Heartbeat** :
221- - Janitor periodically updates an “executor heartbeat” in Redis for all executor IDs.
222- - This makes it possible (now or in the future) to detect stale or dead executors.
222+ - <!-- prettier-ignore -->
223+ - Janitor periodically updates an “executor heartbeat” in Redis for all executor IDs.
224+ - This makes it possible (now or in the future) to detect stale or dead executors.
223225
224226- ** Janitor loop** :
225- - Checks failed tasks and handles retries / dead tasks.
226- - Maintains executor heartbeats in Redis.
227- - Responds to shutdown signals cleanly.
227+ - <!-- prettier-ignore -->
228+ - Checks failed tasks and handles retries / dead tasks.
229+ - Maintains executor heartbeats in Redis.
230+ - Responds to shutdown signals cleanly.
228231
229232On shutdown (` Ctrl+C ` ):
230233
@@ -239,15 +242,18 @@ On shutdown (`Ctrl+C`):
239242Some practical patterns:
240243
241244- ** Single queue, single worker** – simplest:
242- - One worker process with ` --queue default ` , ` --concurrency ` tuned to your workload.
245+ - <!-- prettier-ignore -->
246+ - One worker process with ` --queue default ` , ` --concurrency ` tuned to your workload.
243247
244248- ** Multiple queues by priority** :
245- - Separate workers for ` default ` , ` urgent ` , ` reports ` , etc.
246- - Each queue can have different concurrency and be scaled independently.
249+ - <!-- prettier-ignore -->
250+ - Separate workers for ` default ` , ` urgent ` , ` reports ` , etc.
251+ - Each queue can have different concurrency and be scaled independently.
247252
248253- ** Horizontal scaling** :
249- - Run multiple worker processes for the same queue on one or more machines.
250- - Redis ensures tasks are distributed across workers.
254+ - <!-- prettier-ignore -->
255+ - Run multiple worker processes for the same queue on one or more machines.
256+ - Redis ensures tasks are distributed across workers.
251257
252258Example (two workers for ` default ` , one for ` urgent ` ):
253259
0 commit comments