diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2021-02-02 15:02:33 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2021-02-02 15:02:33 +0100 |
commit | 33de6758b72698fbc8e8b0a708992dbfbe9573cf (patch) | |
tree | d975321194bfbaa3b960e836ec57e6b62cd5494c /src | |
parent | 245f09bd220695664e754f5407f424e9033c322c (diff) | |
parent | 21599575558fe2f456265d1b2381eab6184c7dbd (diff) |
Merge branch 'fix-progress'
Diffstat (limited to 'src')
-rw-r--r-- | src/endpoint/scheduler.rs | 5 | ||||
-rw-r--r-- | src/orchestrator/orchestrator.rs | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/endpoint/scheduler.rs b/src/endpoint/scheduler.rs index a4721a8..a993833 100644 --- a/src/endpoint/scheduler.rs +++ b/src/endpoint/scheduler.rs @@ -179,9 +179,10 @@ impl JobHandle { log_dir: self.log_dir.as_ref(), job_id, log_receiver, - bar: &self.bar, + bar: self.bar.clone(), } .join(); + drop(self.bar); let (run_container, logres) = tokio::join!(running_container, logres); let log = logres.with_context(|| anyhow!("Collecting logs for job on '{}'", ep.name()))?; @@ -320,7 +321,7 @@ struct LogReceiver<'a> { log_dir: Option<&'a PathBuf>, job_id: Uuid, log_receiver: UnboundedReceiver<LogItem>, - bar: &'a ProgressBar, + bar: ProgressBar, } impl<'a> LogReceiver<'a> { diff --git a/src/orchestrator/orchestrator.rs b/src/orchestrator/orchestrator.rs index ecd994a..de2f82f 100644 --- a/src/orchestrator/orchestrator.rs +++ b/src/orchestrator/orchestrator.rs @@ -233,11 +233,14 @@ impl<'a> Orchestrator<'a> { let (sender, receiver) = tokio::sync::mpsc::channel(100); trace!("Creating TaskPreparation object for job {}", uuid); + let bar = self.progress_generator.bar(); + let bar = multibar.add(bar); + bar.set_length(100); let tp = TaskPreparation { uuid: *uuid, jobdef, - bar: multibar.add(self.progress_generator.bar()), + bar, config: self.config, source_cache: &self.source_cache, scheduler: &self.scheduler, |