start_filter
Filter tasks.
def start_filter(
app: Celery,
conn: kombu.Connection,
filter: callable,
limit: int = None,
timeout: float = 1.0,
ack_messages: bool = False,
tasks: list = None,
queues: list = None,
callback: callable = None,
forever: bool = False,
on_declare_queue: callable = None,
consume_from: list = None,
state: Any = None,
accept: list = None,
**kwargs: dict
) - > Any
Filter tasks.
Parameters
| Name | Type | Description |
|---|---|---|
| app | Celery | The Celery application instance used to access configuration and task registries. |
| conn | kombu.Connection | The broker connection used to consume messages for filtering. |
| filter | callable | A predicate function used to determine which tasks should be processed or matched. |
| limit | int = None | The maximum number of tasks to process before stopping. |
| timeout | float = 1.0 | The maximum time in seconds to wait for new messages from the broker. |
| ack_messages | bool = False | Whether to acknowledge messages to the broker after they have been filtered. |
| tasks | list = None | A list of specific task names to include in the filtering process. |
| queues | list = None | A list of queue names to consume from during the filtering operation. |
| callback | callable = None | A function to be executed for every task that matches the filter criteria. |
| forever | bool = False | If true, the filterer will continue to run indefinitely until manually stopped. |
| on_declare_queue | callable = None | An optional callback triggered when a queue is declared by the consumer. |
| consume_from | list = None | Specific queue instances or names to bind the consumer to. |
| state | Any = None | An optional state object used to track the progress or results of the filtering. |
| accept | list = None | A list of content types to accept (e.g., ['json', 'pickle']). |
| **kwargs | dict | Additional keyword arguments passed directly to the Filterer constructor. |
Returns
| Type | Description |
|---|---|
Any | The result of the Filterer.start() execution, typically initiating the task filtering process. |