Fokko commented on a change in pull request #4298: [AIRFLOW-3478] Make sure that the session is closed URL: https://github.com/apache/airflow/pull/4298#discussion_r245813920
########## File path: airflow/bin/cli.py ########## @@ -423,14 +418,11 @@ def unpause(args, dag=None): def set_is_paused(is_paused, args, dag=None): dag = dag or get_dag(args) - session = settings.Session() - dm = session.query(DagModel).filter( - DagModel.dag_id == dag.dag_id).first() - dm.is_paused = is_paused - session.commit() Review comment: I've restored the `.commit()` for now. I would like to work this Friday on setting the `expire_on_commit=True`: https://github.com/apache/airflow/blob/master/airflow/settings.py#L198 It feels like we have a lot of connections to the database because they aren't properly closed. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services