From 0276ea19e0838827300de400b40bddf344caedb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 25 May 2018 09:25:46 +0200 Subject: [PATCH] afterjobs: make sure postgresql connection is not reused in thread (#24078) --- wcs/qommon/http_response.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wcs/qommon/http_response.py b/wcs/qommon/http_response.py index 386ff696..33245fe1 100644 --- a/wcs/qommon/http_response.py +++ b/wcs/qommon/http_response.py @@ -148,6 +148,9 @@ class HTTPResponse(quixote.http_response.HTTPResponse): if not self.after_jobs: return + # make sure postgresql connection is not reused in thread + get_publisher().pgconn = None + for job, job_function in self.after_jobs: if job.completion_time: continue -- 2.17.0