diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-11-13 08:43:11 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-11-13 09:48:56 +0100 |
commit | 6f16b36b5dff94d6a5160e33ebb056f6c128b5d3 (patch) | |
tree | 2686b831b08d29ac0935799c412f64fe97a00b1a /src/util | |
parent | 2b971a3ee6f5506994f6f7c45f73d1b0f23aa57d (diff) |
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 <mail@beyermatthias.de>
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/progress.rs | 1 |
1 files changed, 1 insertions, 0 deletions
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, |