summaryrefslogtreecommitdiff
path: root/src/core/job.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/job.c')
-rw-r--r--src/core/job.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/job.c b/src/core/job.c
index f791299a9d..9cd6ce24b8 100644
--- a/src/core/job.c
+++ b/src/core/job.c
@@ -874,6 +874,9 @@ void job_add_to_run_queue(Job *j) {
if (j->in_run_queue)
return;
+ if (!j->manager->run_queue)
+ sd_event_source_set_enabled(j->manager->run_queue_event_source, SD_EVENT_ONESHOT);
+
LIST_PREPEND(run_queue, j->manager->run_queue, j);
j->in_run_queue = true;
}