airflow tasklifecycle

When a DAG run is triggered, tasks are going to be executed one after another according to their dependencies, Each task will go through different stages from start to completion. Every stage indicates a specific status of the task instance. There are 11 status in total.

statusmeaning
no_statusscheduler created empty task instance
scheduledscheduler determined task instance needs to run
queuedafter scheduling, scheduler sent task to executor to run on the queue and execute the task once worker is free
runningworker has picked up the task and running it
successtask is success
removedtask is removed
upstream_failedthe task’s upstream task failed
up_for_reschedulerunning task is waiting to be reschedule due to specific cases
skippedtask is skipped
failedtask is failed
shutdowntask is aborted
up_for_retrywhen task is failed or shutdown, it will rerun if the maximum retry number is not yet reached