rate_limit
Tell worker(s) to modify the rate limit for a task by type.
def rate_limit(
state: object,
task_name: string,
rate_limit: string
) - > dict
Tell worker(s) to modify the rate limit for a task by type.
Parameters
| Name | Type | Description |
|---|---|---|
| state | object | The current worker state object containing the application instance and consumer. |
| task_name | string | The registered name of the task type to update the rate limit for. |
| rate_limit | string | The new rate limit value, expressed as a frequency string (e.g., '5/s', '10/m') or an integer. |
Returns
| Type | Description |
|---|---|
dict | A dictionary containing the status of the operation (ok or nok) and a descriptive message. |