Skip to content

Commit 88b699b

Browse files
committed
Handle jobs with null job created
1 parent 64c5000 commit 88b699b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

metrics_utility/library/collectors/controller/main_jobevent_service.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ def main_jobevent_service(*, db=None, since=None, until=None, output_dir=None):
6868
# This reduces potentially 100K timestamps down to ~100-1000 hourly ranges
6969
hour_boundaries = set()
7070
for job_id, job_created in jobs:
71+
# Skip jobs with NULL created timestamp (defensive programming)
72+
if job_created is None:
73+
continue
7174
# Truncate to hour boundary (matching partition boundaries)
7275
hour_start = job_created.replace(minute=0, second=0, microsecond=0)
7376
hour_boundaries.add(hour_start)

0 commit comments

Comments
 (0)