narrow-secretary-95110
10/23/2023, 11:34 AM...
@step
def schedule_workers(self):
worker_inputs = [...]
self.next(self.run_worker, foreach='worker_inputs')
@catch(var='timeout')
@retry(times=0)
@timeout(seconds=3600)
@step
def run_worker(self):
...
...
Flows are deployed to aws step functions.
I want the run to succeed in case run_worker tasks time out.
However, the problem that I'm experiencing is that as soon as one of the run_worker tasks time out, other run_worker tasks are aborted, and the run fails (exception is not caught).
Anyone has any suggestions how to fix this?
Let me know if you need more explanation.
Thanks!narrow-secretary-95110
10/23/2023, 1:19 PMancient-application-36103
10/23/2023, 3:23 PMnarrow-secretary-95110
10/23/2023, 6:39 PMancient-application-36103
10/24/2023, 5:06 PMnarrow-secretary-95110
10/24/2023, 6:02 PMrun_worker step from my example above (in the screenshot the step is actually called timed_step and timeout is 1 min)
one starts few mins after the other because the ec2 instance had to be provisioned in the backgroundbulky-afternoon-92433
11/02/2023, 3:46 PMtimed_step such that they could possibly interfere with the internals of @timeout ? specifically it relies on signal to break the process, so I'm wondering if a heavy process interferes with this enough that we do not send our own signal in time, instead falling to the AWS job timeout instead, which results in the exit 137narrow-secretary-95110
11/02/2023, 3:55 PMtime.sleep)
I think there were only these two tasks in the foreach split
however, the production code where I first noticed this issue had more tasks in split (around 10), and it did spin up another process in backgroundbulky-afternoon-92433
11/02/2023, 4:02 PMnarrow-secretary-95110
11/02/2023, 4:04 PMbulky-afternoon-92433
11/02/2023, 4:07 PM