From 7470fc547a232aa7b810f0bb7283dcec7c483741 Mon Sep 17 00:00:00 2001 From: Fokko Driesprong Date: Sat, 6 Apr 2019 15:29:10 +0200 Subject: [PATCH] [AIRFLOW-4252] Remove the unused sessions (#5051) * [AIRFLOW-4252] Remove the unused sessions Some housekeeping * [AIRFLOW-4252] Remove the provide_context --- airflow/models/__init__.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/airflow/models/__init__.py b/airflow/models/__init__.py index f6ce5b42159e9..95255f39f999a 100755 --- a/airflow/models/__init__.py +++ b/airflow/models/__init__.py @@ -3408,12 +3408,10 @@ def handle_callback(self, dagrun, success=True, reason=None, session=None): context.update({'reason': reason}) callback(context) - @provide_session - def get_active_runs(self, session=None): + def get_active_runs(self): """ Returns a list of dag run execution dates currently running - :param session: :return: List of execution dates """ runs = DagRun.find(dag_id=self.dag_id, state=State.RUNNING) @@ -3840,8 +3838,7 @@ def get_task(self, task_id): return self.task_dict[task_id] raise AirflowException("Task {task_id} not found".format(task_id=task_id)) - @provide_session - def pickle_info(self, session=None): + def pickle_info(self): d = dict() d['is_picklable'] = True try: