Skip to content

Possibility of retrying after task timeout #109

@espdev

Description

@espdev

We encountered some difficulties in managing the retrying logic.
Let's say we want to set a timeout for a task, but we also want retry to be triggered when a TimeoutError occurs.

As I understand it, we cannot control this behavior at present. The task is considered done when a TimeoutError occurs. According to the following code:

streaq/streaq/worker.py

Lines 1053 to 1058 in 8c221ba

except TimeoutError as e:
if not task.silent:
logger.error(f"task {task.fn_name}{task_id} timed out")
result = e
success = False
done = True

But in many cases, it would be helpful to try running the task again after it ran out of time last time.

@Graeme22 how do you think about it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions