Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions pubtools/pulplib/_impl/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ def __init__(self, url, **kwargs):
# - checks HTTP response and raises if it's not JSON or
# it's not successful
self._request_executor = (
Executors.thread_pool(max_workers=self._REQUEST_THREADS)
Executors.thread_pool(
name="pubtools-pulplib-requests", max_workers=self._REQUEST_THREADS
)
.with_map(self._unpack_response)
.with_retry(retry_policy=self._RETRY_POLICY)
)
Expand All @@ -161,7 +163,9 @@ def __init__(self, url, **kwargs):
# - throttles number of tasks pending
poller = TaskPoller(self._new_session(), self._url)
self._task_executor = (
Executors.thread_pool(max_workers=self._REQUEST_THREADS)
Executors.thread_pool(
name="pubtools-pulplib-tasks", max_workers=self._REQUEST_THREADS
)
.with_map(self._unpack_response)
.with_map(self._log_spawned_tasks)
.with_poll(poller, cancel_fn=poller.cancel)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
requests
more-executors>=2.3.0
more-executors>=2.7.0
six
PyYAML
jsonschema
Expand Down