From d3ad5bb757bdc0a00b2f42d4f4d41bb02331c052 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Nov 05 2016 19:33:58 +0000 Subject: Do not cache the session in pagure-ci We had the problem with the webhook service that the session wasn't getting properly updated, so let's use a new session in pagure-ci to avoid this problem as well. --- diff --git a/pagure-ci/pagure_ci_server.py b/pagure-ci/pagure_ci_server.py index a911685..b1f4b7f 100644 --- a/pagure-ci/pagure_ci_server.py +++ b/pagure-ci/pagure_ci_server.py @@ -69,7 +69,9 @@ def handle_messages(): pr_uid = data['pr']['uid'] branch = data['pr']['branch_from'] LOG.info('Looking for PR: %s', pr_uid) - request = pagure.lib.get_request_by_uid(pagure.SESSION, pr_uid) + session = pagure.lib.create_session(pagure.APP.config['DB_URL']) + request = pagure.lib.get_request_by_uid(session, pr_uid) + session.close() if not request: LOG.warning(