Skip to content

Commit 84d1eb3

Browse files
committed
change queue time format
1 parent da42be3 commit 84d1eb3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/upload_complete_workflow_metrics.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,13 @@ def add_standardized_timing_fields(self, db_data: Dict[str, Any], creation_time:
248248
# Duration in integer seconds (consistent across all types)
249249
db_data[FIELD_DURATION_SEC] = TimingProcessor.calculate_time_diff(start_time, end_time)
250250

251-
# Queue time in integer seconds only for workflows/jobs
251+
# Queue time - use the field name that Grafana expects (HH:MM:SS format)
252252
if metric_type != "step":
253-
db_data[FIELD_QUEUE_TIME_SEC] = TimingProcessor.calculate_time_diff(creation_time, start_time)
253+
queue_seconds = TimingProcessor.calculate_time_diff(creation_time, start_time)
254+
# Convert to HH:MM:SS format like the working script
255+
hours, remainder = divmod(queue_seconds, 3600)
256+
minutes, seconds = divmod(remainder, 60)
257+
db_data['queueTime'] = f'{hours:02d}:{minutes:02d}:{seconds:02d}'
254258

255259
# Add @timestamp field for Grafana/OpenSearch indexing (CRITICAL FIX!)
256260
# Use the end_time if available, otherwise use current time

0 commit comments

Comments
 (0)