Skip to content

Commit

Permalink
Enable steady ticking for progressbar
Browse files Browse the repository at this point in the history
  • Loading branch information
BradenEverson authored and claymcleod committed Sep 6, 2024
1 parent ced18af commit 75f7108
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crankshaft/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ pub mod config;
pub mod service;
pub mod task;

use std::time::Duration;

use futures::StreamExt;
use indicatif::ProgressBar;
use indicatif::ProgressStyle;
Expand Down Expand Up @@ -61,6 +63,7 @@ impl Engine {

let mut count = 1;
task_completion_bar.inc(0);
task_completion_bar.enable_steady_tick(Duration::from_millis(100));

while let Some(()) = self.runner.tasks.next().await {
task_completion_bar.set_message(format!("task #{}", count));
Expand Down

0 comments on commit 75f7108

Please sign in to comment.