Skip to content
Open
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
10 changes: 10 additions & 0 deletions clients/python/src/taskbroker_client/worker/workerchild.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,16 @@ def await_task_futures(task: ActivationWithPendingFutures) -> None:

def check_task_future_completion() -> None:
if len(pending_task_futures) > 0:
# Records a distribution of how many activations with pending producer futures
# a processing pool has across all worker child processes.
# Only reports if the worker actually has pending futures.
metrics.distribution(
"taskworker.worker.activations_with_pending_futures",
len(pending_task_futures),
tags={
"processing_pool": processing_pool_name,
},
)
for task in pending_task_futures.copy():
if all([f.done() for f in task.pending_futures]):
await_task_futures(task)
Expand Down
Loading