From e81844b6a6f169a9b6876cf2913b2a73d756e396 Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Sun, 11 Feb 2024 11:29:59 +0100 Subject: [PATCH] state order --- fosdem_video_progress.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/fosdem_video_progress.py b/fosdem_video_progress.py index f5c59d9..12d82c5 100755 --- a/fosdem_video_progress.py +++ b/fosdem_video_progress.py @@ -66,7 +66,23 @@ def main(): # Show the plot x = sorted(ts.data.keys()) # times - states = sorted(ts.states) + # first is lowest + states_low = ( + 'lost', + 'ignored', + 'uninteresting', + 'broken', + 'preview', + 'cutting', + 'transcoding', + 'publishing', + ) + states_high = ( + 'done', + 'waiting_for_files', + ) + states_other = tuple(sorted(ts.states - (set(states_low) | set(states_high)))) + states = states_low + states_other + states_high ys = [tuple(ts.data[time][0].get(state, 0) for state in states) for time in x] # numbers per state # We do not show jobstates atm. Too lazy. # ys are transposed – we need vectors by times, not by states.