File tree Expand file tree Collapse file tree
python/lsst/ctrl/bps/panda Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -251,7 +251,7 @@ def report(
251251 # Sort tasks by workload_id or fallback
252252 try :
253253 tasks .sort (key = lambda x : x ["transform_workload_id" ])
254- except Exception :
254+ except ( KeyError , TypeError ) :
255255 tasks .sort (key = lambda x : x ["transform_id" ])
256256
257257 exit_codes_all = {}
@@ -314,9 +314,17 @@ def report(
314314 njobs = val
315315 if state == WmsStates .RUNNING :
316316 njobs += task .get ("output_new_files" , 0 ) - task .get ("input_new_files" , 0 )
317- wms_report .job_state_counts [state ] += njobs
317+ if state != WmsStates .UNREADY :
318+ wms_report .job_state_counts [state ] += njobs
318319 taskstatus [state ] = njobs
319320
321+ # Count UNREADY
322+ unready = WmsStates .UNREADY
323+ taskstatus [unready ] = totaljobs - sum (
324+ taskstatus [state ] for state in WmsStates if state != unready
325+ )
326+ wms_report .job_state_counts [unready ] += taskstatus [unready ]
327+
320328 # Store task summary
321329 wms_report .job_summary [tasklabel ] = taskstatus
322330 summary_part = f"{ tasklabel } :{ totaljobs } "
Original file line number Diff line number Diff line change @@ -111,8 +111,8 @@ def extract_taskname(s: str) -> str:
111111
112112
113113def aggregate_by_basename (job_summary , exit_code_summary , run_summary ):
114- """
115- Aggregate job exit code and run summaries by their base label (basename).
114+ """Aggregate job exit code and run summaries by
115+ their base label (basename).
116116
117117 Parameters
118118 ----------
You can’t perform that action at this time.
0 commit comments