Skip to content
Snippets Groups Projects
Verified Commit 01497549 authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

swh.indexer.api.client: Permit to specify the query timeout option

Related T1061
parent 760fe7b5
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,7 @@ Build-Depends: debhelper (>= 9), ...@@ -11,7 +11,7 @@ Build-Depends: debhelper (>= 9),
python3-pygments, python3-pygments,
python3-magic, python3-magic,
python3-setuptools, python3-setuptools,
python3-swh.core (>= 0.0.37~), python3-swh.core (>= 0.0.40~),
python3-swh.model (>= 0.0.15~), python3-swh.model (>= 0.0.15~),
python3-swh.objstorage (>= 0.0.13~), python3-swh.objstorage (>= 0.0.13~),
python3-swh.scheduler (>= 0.0.14~), python3-swh.scheduler (>= 0.0.14~),
...@@ -22,7 +22,7 @@ Homepage: https://forge.softwareheritage.org/diffusion/78/ ...@@ -22,7 +22,7 @@ Homepage: https://forge.softwareheritage.org/diffusion/78/
Package: python3-swh.indexer.storage Package: python3-swh.indexer.storage
Architecture: all Architecture: all
Depends: python3-swh.core (>= 0.0.37~), Depends: python3-swh.core (>= 0.0.40~),
python3-swh.model (>= 0.0.15~), python3-swh.model (>= 0.0.15~),
python3-swh.objstorage (>= 0.0.13~), python3-swh.objstorage (>= 0.0.13~),
python3-swh.scheduler (>= 0.0.14~), python3-swh.scheduler (>= 0.0.14~),
...@@ -34,7 +34,7 @@ Description: Software Heritage Content Indexer Storage ...@@ -34,7 +34,7 @@ Description: Software Heritage Content Indexer Storage
Package: python3-swh.indexer Package: python3-swh.indexer
Architecture: all Architecture: all
Depends: python3-swh.scheduler (>= 0.0.14~), Depends: python3-swh.scheduler (>= 0.0.14~),
python3-swh.core (>= 0.0.37~), python3-swh.core (>= 0.0.40~),
python3-swh.model (>= 0.0.15~), python3-swh.model (>= 0.0.15~),
python3-swh.objstorage (>= 0.0.13~), python3-swh.objstorage (>= 0.0.13~),
python3-swh.scheduler (>= 0.0.14~), python3-swh.scheduler (>= 0.0.14~),
......
swh.core >= 0.0.37 swh.core >= 0.0.40
swh.model >= 0.0.15 swh.model >= 0.0.15
swh.objstorage >= 0.0.13 swh.objstorage >= 0.0.13
swh.scheduler >= 0.0.14 swh.scheduler >= 0.0.14
......
# Copyright (C) 2015-2017 The Software Heritage developers # Copyright (C) 2015-2018 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution # See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version # License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information # See top-level LICENSE file for more information
...@@ -11,8 +11,9 @@ from swh.storage.exc import StorageAPIError ...@@ -11,8 +11,9 @@ from swh.storage.exc import StorageAPIError
class RemoteStorage(SWHRemoteAPI): class RemoteStorage(SWHRemoteAPI):
"""Proxy to a remote storage API""" """Proxy to a remote storage API"""
def __init__(self, url): def __init__(self, url, timeout=None):
super().__init__(api_exception=StorageAPIError, url=url) super().__init__(
api_exception=StorageAPIError, url=url, timeout=timeout)
def check_config(self, *, check_write): def check_config(self, *, check_write):
return self.post('check_config', {'check_write': check_write}) return self.post('check_config', {'check_write': check_write})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment