diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-08-25T19·26+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-08-25T19·26+0200 |
commit | 94a0548dc420e23c64b18d36ea8d50a2afbce6fb (patch) | |
tree | 3953949513bce46fb7656f77e6f21784d7aa7a80 /src/nix | |
parent | 9b845e6936929711fe03d23adc1059acdc84a4fd (diff) |
Simplify
Diffstat (limited to 'src/nix')
-rw-r--r-- | src/nix/progress-bar.cc | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/nix/progress-bar.cc b/src/nix/progress-bar.cc index f638c7cfb198..054127f6277e 100644 --- a/src/nix/progress-bar.cc +++ b/src/nix/progress-bar.cc @@ -192,21 +192,6 @@ public: update(*state); } - void progress(ActivityId act, uint64_t done = 0, uint64_t expected = 0, uint64_t running = 0, uint64_t failed = 0) override - { - auto state(state_.lock()); - - auto i = state->its.find(act); - assert(i != state->its.end()); - ActInfo & actInfo = *i->second; - actInfo.done = done; - actInfo.expected = expected; - actInfo.running = running; - actInfo.failed = failed; - - update(*state); - } - void setExpected(ActivityId act, ActivityType type, uint64_t expected) override { auto state(state_.lock()); @@ -260,6 +245,18 @@ public: auto i = state->its.find(act); assert(i != state->its.end()); i->second->phase = getS(fields, 0); + update(*state); + } + + else if (type == resProgress) { + auto i = state->its.find(act); + assert(i != state->its.end()); + ActInfo & actInfo = *i->second; + actInfo.done = getI(fields, 0); + actInfo.expected = getI(fields, 1); + actInfo.running = getI(fields, 2); + actInfo.failed = getI(fields, 3); + update(*state); } } |