From 3f02cc39c774040d8126eace214e55a8b44a819a Mon Sep 17 00:00:00 2001 From: "Antoine R. Dumont (@ardumont)" <antoine.romain.dumont@gmail.com> Date: Thu, 24 May 2018 11:50:46 +0200 Subject: [PATCH] swh.scheduler.api.client: Permit to specify the query timeout option Related T1061 --- debian/control | 2 +- requirements-swh.txt | 2 +- swh/scheduler/api/client.py | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/debian/control b/debian/control index 6a6d5ed9..81641235 100644 --- a/debian/control +++ b/debian/control @@ -15,7 +15,7 @@ Build-Depends: debhelper (>= 9), python3-nose, python3-psycopg2, python3-setuptools, - python3-swh.core (>= 0.0.38~), + python3-swh.core (>= 0.0.40~), python3-vcversioner Standards-Version: 3.9.6 Homepage: https://forge.softwareheritage.org/diffusion/DSCH/ diff --git a/requirements-swh.txt b/requirements-swh.txt index a152b02a..9e6b6d13 100644 --- a/requirements-swh.txt +++ b/requirements-swh.txt @@ -1 +1 @@ -swh.core >= 0.0.38 +swh.core >= 0.0.40 diff --git a/swh/scheduler/api/client.py b/swh/scheduler/api/client.py index 9b3baace..dbb96415 100644 --- a/swh/scheduler/api/client.py +++ b/swh/scheduler/api/client.py @@ -21,8 +21,9 @@ class RemoteScheduler(SWHRemoteAPI): """Proxy to a remote scheduler API """ - def __init__(self, url): - super().__init__(api_exception=SchedulerAPIError, url=url) + def __init__(self, url, timeout=None): + super().__init__( + api_exception=SchedulerAPIError, url=url, timeout=timeout) def close_connection(self): return self.post('close_connection', {}) -- GitLab