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
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- n/a
### Changed

- Internally created executors are now named for improved metrics and debuggability.

## [2.9.0] - 2021-07-05

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
attrs
more-executors
more-executors>=2.7.0
koji>=1.18
six
pushcollector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ErrataRaw(object):
class ErrataClient(object):
def __init__(self, threads, url, **retry_args):
self._executor = (
Executors.thread_pool(max_workers=threads)
Executors.thread_pool(name="pushsource-errata-client", max_workers=threads)
.with_retry(**retry_args)
.with_cancel_on_shutdown()
)
Expand Down
4 changes: 2 additions & 2 deletions src/pushsource/_impl/backend/errata_source/errata_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ def __init__(

# This executor doesn't use retry because koji & ET executors already do that.
self._executor = Executors.thread_pool(
max_workers=threads
name="pushsource-errata", max_workers=threads
).with_cancel_on_shutdown()

# We set aside a separate thread pool for koji so that there are separate
# queues for ET and koji calls, yet we avoid creating a new thread pool for
# each koji source.
self._koji_executor = (
Executors.thread_pool(max_workers=threads)
Executors.thread_pool(name="pushsource-errata-koji", max_workers=threads)
.with_retry()
.with_cancel_on_shutdown()
)
Expand Down
2 changes: 1 addition & 1 deletion src/pushsource/_impl/backend/koji_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def __init__(
self._threads = threads
self._executor = (
executor
or Executors.thread_pool(max_workers=threads)
or Executors.thread_pool(name="pushsource-koji", max_workers=threads)
.with_retry()
.with_cancel_on_shutdown()
)
Expand Down
2 changes: 1 addition & 1 deletion src/pushsource/_impl/backend/staged/staged_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __init__(self, url, threads=4, timeout=60 * 60):
# Note: this executor does not have a retry.
# NFS already does a lot of its own retries.
self._executor = (
Executors.thread_pool(max_workers=threads)
Executors.thread_pool(name="pushsource-staged", max_workers=threads)
.with_timeout(timeout)
.with_cancel_on_shutdown()
)
Expand Down