Skip to content

Commit

Permalink
Refactor _get_state_counts_from_jobs a bit
Browse files Browse the repository at this point in the history
Fixed a type descriptions in _get_state_counts_from_jobs() docstring and
rename variable to follow the naming convention used in other functions.
  • Loading branch information
mxk62 committed Sep 25, 2024
1 parent 66ff5a1 commit 058711b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/lsst/ctrl/bps/htcondor/htcondor_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1560,7 +1560,7 @@ def _get_state_counts_from_jobs(
----------
wms_workflow_id : `str`
HTCondor job id.
jobs : `dict` [`str`, `Any`]
jobs : `dict [`dict` [`str`, `Any`]]
HTCondor dag job information.
Returns
Expand All @@ -1572,9 +1572,9 @@ def _get_state_counts_from_jobs(
that are in that WMS state.
"""
state_counts = dict.fromkeys(WmsStates, 0)
for job_id, job_info in jobs.items():
for job_id, job_ad in jobs.items():
if job_id != wms_workflow_id and not is_service_job(job_id):
state_counts[_htc_status_to_wms_state(job_info)] += 1
state_counts[_htc_status_to_wms_state(job_ad)] += 1
total_counted = sum(state_counts.values())

if "NodesTotal" in jobs[wms_workflow_id]:
Expand Down

0 comments on commit 058711b

Please sign in to comment.