airflow icon indicating copy to clipboard operation
airflow copied to clipboard

Retry Across Tasks

Open aaron-starov opened this issue 11 years ago • 2 comments

It doesn't seem to be in the scope of Airflow, but I just wanted to check if there are any easy solutions for this. If I have tasks 1,2,3 and want to conditionally retry them based on the outcome of a task 4, it seems that I can't because a conditional branch pointing to 1 would create a cycle. I'd guess the way to handle this would be recording the need to retry in a database and having something else schedule a re-run of the workflow. Has anyone set up a system to do this sort of thing?

Thanks for any answers!

aaron-starov avatar Nov 20 '15 18:11 aaron-starov

@aaron-starov would it be possible for you to contain your four tasks in a subdag and retry on the subdagoperator ?

syvineckruyk avatar Nov 20 '15 18:11 syvineckruyk

@syvineckruyk thanks, yes, that would be perfect -- I missed the subdagoperator.

aaron-starov avatar Nov 20 '15 20:11 aaron-starov