+ bool have_running = false;
+ for (auto i: _jobs) {
+ if ((have_running || _paused) && i->running()) {
+ /* We already have a running job, or are totally paused, so this job should not be running */
+ i->pause_by_priority();
+ } else if (!have_running && !_paused && (i->is_new() || i->paused_by_priority())) {
+ /* We don't have a running job, and we should have one, so start/resume this */