airflow.models.taskreschedule

TaskReschedule tracks rescheduled task instances.

Module Contents

Classes

TaskReschedule

TaskReschedule tracks rescheduled task instances.

class airflow.models.taskreschedule.TaskReschedule(task, run_id, try_number, start_date, end_date, reschedule_date, map_index=-1)[source]

Bases: airflow.models.base.Base

TaskReschedule tracks rescheduled task instances.

__tablename__ = task_reschedule[source]
id[source]
task_id[source]
dag_id[source]
run_id[source]
map_index[source]
try_number[source]
start_date[source]
end_date[source]
duration[source]
reschedule_date[source]
__table_args__[source]
dag_run[source]
execution_date[source]
static query_for_task_instance(task_instance, descending=False, session=None, try_number=None)[source]

Returns query for task reschedules for a given the task instance.

Parameters
  • session – the database session object

  • task_instance – the task instance to find task reschedules for

  • descending – If True then records are returned in descending order

  • try_number – Look for TaskReschedule of the given try_number. Default is None which looks for the same try_number of the given task_instance.

static find_for_task_instance(task_instance, session=None, try_number=None)[source]

Returns all task reschedules for the task instance and try number, in ascending order.

Parameters
  • session – the database session object

  • task_instance – the task instance to find task reschedules for

  • try_number – Look for TaskReschedule of the given try_number. Default is None which looks for the same try_number of the given task_instance.

Was this entry helpful?