time_limit
Tell worker(s) to modify the time limit for task by type.
def time_limit(
state: object,
task_name: string,
hard: float,
soft: float,
**kwargs: any
) - > dict
Tell worker(s) to modify the time limit for task by type.
Parameters
| Name | Type | Description |
|---|---|---|
| state | object | The current worker state object containing the application instance and task registry. |
| task_name | string | Name of the task type for which time limits should be modified. |
| hard | float | The maximum number of seconds a task can run before it is forcefully terminated. |
| soft | float | The number of seconds a task can run before a soft timeout exception is raised, allowing for graceful cleanup. |
| **kwargs | any | Additional keyword arguments passed by the control command decorator. |
Returns
| Type | Description |
|---|---|
dict | A dictionary containing a status message indicating whether the time limits were set successfully or if the task was unknown. |