From 1217b4e4a4d61b479e986218c7839963280dd457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Ignacio=20S=C3=A1nchez=20Lara?= Date: Tue, 18 Aug 2015 08:27:14 +0200 Subject: [PATCH] Cache http client with private SD --- scripts-available/CDB_Groups_API.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts-available/CDB_Groups_API.sql b/scripts-available/CDB_Groups_API.sql index 08416a5..d1c1ba4 100644 --- a/scripts-available/CDB_Groups_API.sql +++ b/scripts-available/CDB_Groups_API.sql @@ -115,7 +115,7 @@ $$ last_err = None while retry > 0: try: - client = GD['groups_api_client'] = httplib.HTTPConnection(params['host'], params['port'], False, params['timeout']) + client = SD['groups_api_client'] = httplib.HTTPConnection(params['host'], params['port'], False, params['timeout']) client.request(method, url, body, headers) response = client.getresponse() assert response.status in [ 200, 409 ] @@ -124,7 +124,7 @@ $$ retry -= 1 last_err = err plpy.warning('Retrying after: ' + str(err)) - client = GD['groups_api_client'] = None + client = SD['groups_api_client'] = None if last_err is not None: plpy.error('Fatal Group API error: ' + str(last_err))