summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2013-03-12 22:28:44 +0100
committerMichal Schmidt <mschmidt@redhat.com>2013-03-13 00:13:24 +0100
commit5b176ee064d9737fd933dfeb660d015c19649794 (patch)
tree4344e5285ce78918ceef64640234681527c309c1 /src/core
parent6bde0b3220e95a08cefb70846f73b2cf24b7734a (diff)
manager: push back animation timer whenever a job finishes
The running jobs animation is supposed to hide itself when jobs are progressing sufficiently fast.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/manager.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index c261b25fb6..77eaa468d9 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -148,6 +148,9 @@ static int manager_setup_notify(Manager *m) {
static int manager_jobs_in_progress_mod_timer(Manager *m) {
struct itimerspec its;
+ if (m->jobs_in_progress_watch.type != WATCH_JOBS_IN_PROGRESS)
+ return 0;
+
zero(its);
its.it_value.tv_sec = JOBS_IN_PROGRESS_WAIT_SEC;
@@ -2373,8 +2376,10 @@ void manager_check_finished(Manager *m) {
if (m->n_running_jobs == 0)
manager_unwatch_jobs_in_progress(m);
- if (hashmap_size(m->jobs) > 0)
+ if (hashmap_size(m->jobs) > 0) {
+ manager_jobs_in_progress_mod_timer(m);
return;
+ }
/* Notify Type=idle units that we are done now */
close_pipe(m->idle_pipe);