@@ -52,6 +52,7 @@ use tako::{Map, format_comma_delimited};
5252
5353pub const TASK_COLOR_CANCELED : Colorization = Colorization :: Magenta ;
5454pub const TASK_COLOR_FAILED : Colorization = Colorization :: Red ;
55+ pub const TASK_COLOR_ABORTED : Colorization = Colorization :: BrightRed ;
5556pub const TASK_COLOR_FINISHED : Colorization = Colorization :: Green ;
5657pub const TASK_COLOR_RUNNING : Colorization = Colorization :: Yellow ;
5758pub const TASK_COLOR_INVALID : Colorization = Colorization :: BrightRed ;
@@ -1278,32 +1279,38 @@ fn job_status_to_cell(info: &JobInfo) -> String {
12781279 & mut result,
12791280 "RUNNING" ,
12801281 info. counters . n_running_tasks ,
1281- colored :: Color :: Yellow ,
1282+ TASK_COLOR_RUNNING ,
12821283 ) ;
12831284 row (
12841285 & mut result,
12851286 "FAILED" ,
12861287 info. counters . n_failed_tasks ,
1287- colored :: Color :: Red ,
1288+ TASK_COLOR_FAILED ,
12881289 ) ;
12891290 row (
12901291 & mut result,
12911292 "FINISHED" ,
12921293 info. counters . n_finished_tasks ,
1293- colored :: Color :: Green ,
1294+ TASK_COLOR_FINISHED ,
12941295 ) ;
12951296 row (
12961297 & mut result,
12971298 "CANCELED" ,
12981299 info. counters . n_canceled_tasks ,
1299- colored :: Color :: Magenta ,
1300+ TASK_COLOR_CANCELED ,
13001301 ) ;
13011302 row (
13021303 & mut result,
13031304 "WAITING" ,
13041305 info. counters . n_waiting_tasks ( info. n_tasks ) ,
13051306 colored:: Color :: Cyan ,
13061307 ) ;
1308+ row (
1309+ & mut result,
1310+ "ABORTED" ,
1311+ info. counters . n_aborted_tasks ,
1312+ TASK_COLOR_ABORTED ,
1313+ ) ;
13071314 result
13081315}
13091316
@@ -1343,6 +1350,7 @@ pub fn job_progress_bar(counters: JobTaskCounters, n_tasks: JobTaskCount, width:
13431350 ( counters. n_failed_tasks, TASK_COLOR_FAILED ) ,
13441351 ( counters. n_finished_tasks, TASK_COLOR_FINISHED ) ,
13451352 ( counters. n_running_tasks, TASK_COLOR_RUNNING ) ,
1353+ ( counters. n_aborted_tasks, TASK_COLOR_ABORTED ) ,
13461354 ] ;
13471355
13481356 let chars = |count : JobTaskCount | {
@@ -1432,6 +1440,7 @@ fn status_to_cell(status: &Status) -> CellStruct {
14321440 Status :: Failed => "FAILED" . cell ( ) . foreground_color ( Some ( Color :: Red ) ) ,
14331441 Status :: Running => "RUNNING" . cell ( ) . foreground_color ( Some ( Color :: Yellow ) ) ,
14341442 Status :: Canceled => "CANCELED" . cell ( ) . foreground_color ( Some ( Color :: Magenta ) ) ,
1443+ Status :: Aborted => "ABORTED" . cell ( ) . foreground_color ( Some ( Color :: Blue ) ) ,
14351444 }
14361445}
14371446
@@ -1537,6 +1546,10 @@ fn get_task_time(state: &JobTaskState) -> (Option<DateTime<Utc>>, Option<DateTim
15371546 JobTaskState :: Canceled {
15381547 started_data : Some ( started_data) ,
15391548 cancelled_date,
1549+ }
1550+ | JobTaskState :: Aborted {
1551+ started_data : Some ( started_data) ,
1552+ cancelled_date,
15401553 } => ( Some ( started_data. start_date ) , Some ( * cancelled_date) ) ,
15411554 JobTaskState :: Running { started_data, .. } => ( Some ( started_data. start_date ) , None ) ,
15421555 JobTaskState :: Finished {
@@ -1553,6 +1566,10 @@ fn get_task_time(state: &JobTaskState) -> (Option<DateTime<Utc>>, Option<DateTim
15531566 started_data : None ,
15541567 cancelled_date : _,
15551568 }
1569+ | JobTaskState :: Aborted {
1570+ started_data : None ,
1571+ cancelled_date : _,
1572+ }
15561573 | JobTaskState :: Failed {
15571574 started_data : None , ..
15581575 }
0 commit comments