worker
SAQ worker and queue.
queue
module-attribute
¶
Queue ¶
Worker ¶
Bases: saq.Worker
Modify behavior of saq worker for orchestration by Starlite.
create_worker_instance ¶
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
functions |
Collection[Callable[..., Any] | tuple[str, Callable]]
|
Functions to be called via the async workers. |
required |
before_process |
Callable[[dict[str, Any]], Awaitable[Any]] | None
|
Async function called before a job processes. |
None
|
after_process |
Callable[[dict[str, Any]], Awaitable[Any]] | None
|
Async function called after a job processes. |
None
|
Returns:
| Type | Description |
|---|---|
Worker
|
The worker instance, instantiated with |