Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAGs exit immediately when there are no products to process #245

Open
randomorder opened this issue Oct 17, 2017 · 3 comments
Open

DAGs exit immediately when there are no products to process #245

randomorder opened this issue Oct 17, 2017 · 3 comments

Comments

@randomorder
Copy link
Member

Would be nice to have DAGs runs exit immediately after the search / download tasks is there is no products to process.

Currently this does not happen and all tasks are executed anyway. Operators should handle this gracefully as per #243 but I think would be good to have the DAGs terminate their execution early when there is nothing to process.

One way to achieve this would be to branch after the search / download and have a Dummy "finish" task by changing existing DAGs:

One possibility is to branch after the search / download and have a Dummy "finish" task:

From
graph1

Into:
graph2

Airflow may also provide other mechanisms to do this

@torse What do you think

@torse
Copy link
Contributor

torse commented Oct 18, 2017

Maybe we could branch the DAG before Download? Otherwise LGTM.

I like the approach to define a Finishing task. It could later on also send notification and/or update the elasticsearch database..

@maabdelghaffar
Copy link
Contributor

@torse @randomorder how about using ShortCircuitOperator to allow the DAG to continue running only if our condition met ?

@randomorder
Copy link
Member Author

I don't have a strong opinion on this either would work for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants