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:
|
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?
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
TimeoutErroroccurs.As I understand it, we cannot control this behavior at present. The task is considered done when a
TimeoutErroroccurs. According to the following code:streaq/streaq/worker.py
Lines 1053 to 1058 in 8c221ba
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?