diff options
author | 2024-05-21 09:35:09 +0200 | |
---|---|---|
committer | 2024-05-27 00:28:12 +0100 | |
commit | f1843024c34b8915786d3044f6f1b3a3b72284bf (patch) | |
tree | f62aa02d4e0909bae698c92470972fa1ade31499 | |
parent | sync: don't use ipv6 for rsync when it's disabled (diff) | |
download | portage-f1843024c34b8915786d3044f6f1b3a3b72284bf.tar.gz portage-f1843024c34b8915786d3044f6f1b3a3b72284bf.tar.bz2 portage-f1843024c34b8915786d3044f6f1b3a3b72284bf.zip |
Scheduler: coalesce common code in _schedule_tasks_imp()
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | lib/_emerge/Scheduler.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/lib/_emerge/Scheduler.py b/lib/_emerge/Scheduler.py index 5c318f89b..77318b0b3 100644 --- a/lib/_emerge/Scheduler.py +++ b/lib/_emerge/Scheduler.py @@ -1985,15 +1985,6 @@ class Scheduler(PollScheduler): self._task_queues.merge.addFront(merge) merge.addExitListener(self._merge_exit) - elif pkg.built: - self._jobs += 1 - self._previous_job_start_time = time.time() - self._status_display.running = self._jobs - self._running_tasks[id(task)] = task - task.scheduler = self._sched_iface - self._task_queues.jobs.add(task) - task.addExitListener(self._extract_exit) - else: self._jobs += 1 self._previous_job_start_time = time.time() @@ -2001,7 +1992,11 @@ class Scheduler(PollScheduler): self._running_tasks[id(task)] = task task.scheduler = self._sched_iface self._task_queues.jobs.add(task) - task.addExitListener(self._build_exit) + + if pkg.built: + task.addExitListener(self._extract_exit) + else: + task.addExitListener(self._build_exit) return bool(state_change) |