Skip to content

Commit

Permalink
[AIRFLOW-4252] Remove the unused sessions (apache#5051)
Browse files Browse the repository at this point in the history
* [AIRFLOW-4252] Remove the unused sessions

Some housekeeping

* [AIRFLOW-4252] Remove the provide_context
  • Loading branch information
Fokko authored and XD-DENG committed Apr 6, 2019
1 parent e8cd3e2 commit 7470fc5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions airflow/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 7470fc5

Please sign in to comment.