Milimetric has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/371218 )

Change subject: Try to close the sessions while validating
......................................................................

Try to close the sessions while validating

Change-Id: Ia89de02d748e34cb65a1911b4243c78b5e6abf4a
---
M wikimetrics/models/validate_cohort.py
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics 
refs/changes/18/371218/1

diff --git a/wikimetrics/models/validate_cohort.py 
b/wikimetrics/models/validate_cohort.py
index bfc1a79..546e0f7 100644
--- a/wikimetrics/models/validate_cohort.py
+++ b/wikimetrics/models/validate_cohort.py
@@ -243,6 +243,7 @@
         else:
             clause = MediawikiUser.user_name.in_(users_dict.keys())
         matches = session.query(MediawikiUser).filter(clause).all()
+        session.close()
 
     # no need to roll back session because it's just a query
     except OperationalError:

-- 
To view, visit https://gerrit.wikimedia.org/r/371218
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia89de02d748e34cb65a1911b4243c78b5e6abf4a
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wikimetrics
Gerrit-Branch: master
Gerrit-Owner: Milimetric <dandree...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to