From 6f16b36b5dff94d6a5160e33ebb056f6c128b5d3 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 13 Nov 2020 08:43:11 +0100 Subject: Move log collecting to endpoint code This patch moves the log-setup and -collecting to the endpoint implementation, that takes care of running the job. This is required because here we aggregate the log and here we know all information that need to be written to the database, so it seems natural to move the log-collecting code (and everything else related to the database entry for the job) to this position in the code. This implies that the "job" is written to the database _after_ it was run. This is due to the fact that we cannot write the job entry before we have the logs. We _have to_ collect the logs in memory (we can also write to a log-dump-file, of course), but we cannot create the job object in the database and then append the logs to it. This might change in the future, but for now that's the way it is done. Signed-off-by: Matthias Beyer --- src/util/progress.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/util') diff --git a/src/util/progress.rs b/src/util/progress.rs index 56d4e92..9e3036f 100644 --- a/src/util/progress.rs +++ b/src/util/progress.rs @@ -2,6 +2,7 @@ use indicatif::*; use uuid::Uuid; use url::Url; +#[derive(Clone, Debug)] pub struct ProgressBars { bar_template: String, hide: bool, -- cgit v1.2.3