YD
12/21/2022, 7:41 AM'state_handlers': [o.p_state_handler]
which sent me an SMS alert on task failure.
how can i achieve this kind of behavior in Prefect 2.0?
thanksKalise Richmond
12/21/2022, 6:16 PMYD
12/21/2022, 6:21 PMtask_future.wait() # block until completion
blocking?
my current handler also looks check the max retries.
prefect.context.get("task_run_count") > obj.max_retries
and I check that task is finished and failed
new_state.is_finished() and new_state.is_failed()
In Prefect 2.0 I can do:
r = task_future.get_state()
and then check
if r.is_final() and r.is_failed()
but I do not see if this take into account the retries
Does it ?Kalise Richmond
12/21/2022, 10:52 PMYD
12/23/2022, 7:15 PMKalise Richmond
12/23/2022, 8:15 PM