martin-g commented on code in PR #1686:
URL: 
https://github.com/apache/datafusion-ballista/pull/1686#discussion_r3219514081


##########
ballista/scheduler/src/api/handlers.rs:
##########
@@ -729,14 +728,14 @@ fn get_running_stage_time(task_infos: 
&[Option<TaskInfo>], current_time: u128) -
         .filter(|t| *t > 0)
         .min();
 
+    let time = Time::new();
     match (min_start, current_time) {
         (Some(start), end) if end > start => {
-            let t = Time::new();
-            t.add_duration(Duration::from_millis((end - start) as u64));
-            t.to_string()
+            time.add_duration(Duration::from_millis((end - start) as u64));
         }
-        _ => "0".to_string(),

Review Comment:
   I see!
   How about "N/A" ?
   
   I had the same issue in the TUI app. When `end_exec_time` is `0` (i.e. 
unfinished job) I was wondering between "N/A" and "a running duration", i.e. 
"now() - start_exec_time" on every tick/refresh. But the TUI's system time may 
be different than the Scheduler's system time and I decided to show "N/A".



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to