ffinfo edited a comment on issue #4872: [AIRFLOW-4038] Restructure database 
queries on /home
URL: https://github.com/apache/airflow/pull/4872#issuecomment-470598941
 
 
   @XD-DENG: Almost, indeed the main thing is to switch from `provide_session` 
to `create_session`. Also the order of statements is changes a bit because 
dags_query was build up on multiple statements but in-between the error query 
was there. this is now grouped.
   
   About the switch from provide_session to create_session. Me and @Fokko did a 
little research and using create_session keeps less time a session locked to a 
scope. `@provide_session` on nested sessions can keep the session open for a 
long time while not really needed. Of course this is bigger then just this call 
but try to convert things where I can. Has targeting this method to remove the 
DagBag of the Webserver but I did notice that this call has no usage of DagBag. 
By this time I already changed the provide_session ;)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

Reply via email to