Killing a DAG in progress

6,632 views
Skip to first unread message

jaso...@blueapron.com

unread,
Oct 12, 2015, 2:07:59 PM10/12/15
to Airflow
I have a DAG with a task running and I'd like to kill the process (not just clear).  Is this possible when using the LocalExecutor?

Daniel Kranowski

unread,
Oct 12, 2015, 4:42:45 PM10/12/15
to Airflow
This prior answer might work for you: https://groups.google.com/d/msg/airbnb_airflow/trGPBHw7BkE/yqYizM8UAQAJ

Also I think you could go to Browse > Task Instances (in the Webserver ui) and trash the task, but I haven't tried it on a running task yet.

Maxime Beauchemin

unread,
Oct 12, 2015, 11:57:55 PM10/12/15
to Airflow
Note that all task instance run in a subprocess, and that the parent process sends a periodical heartbeat to the database (checkout the Job model) and listens for kill signals at that time (looking at their own state for a 'shutdown' state). Kill signals are currently only emitted when running tasks are cleared (through the CLI or the UI). When that occurs, the on_kill method of the operator is called (if any) before it sets the state from shutdown to failed, and raises.
Reply all
Reply to author
Forward
0 new messages