FluxQueue class
This page documents the main Python entry point for FluxQueue.
FluxQueue is the object you create in your app to enqueue work into Redis for the worker to process.
You can import the FluxQueue class from fluxqueue:
fluxqueue.FluxQueue
High-level client for enqueueing Python callables as background tasks.
It uses the Rust-backed core to push tasks into Redis and is intended to be the main entry point used from your application code.
In most cases you create a single instance per application or service and
reuse it. The redis_url parameter controls which Redis instance is used.
Source code in fluxqueue/core.py
task
Mark a function as a FluxQueue task.
This returns a decorator. When you apply it to a function, calling that function will enqueue a task in Redis instead of running the function immediately. The actual work is done later by the worker.
Parameters
name:
Optional explicit task name. If not set, a name is derived from the
function name.
queue:
Name of the queue to push tasks to. Defaults to "default".
max_retries:
Maximum number of retries the worker will attempt for this task
before treating it as dead.
Source code in fluxqueue/core.py
options: members: - task