summaryrefslogtreecommitdiff
path: root/src/buildstream/_scheduler/scheduler.py
diff options
context:
space:
mode:
authorBenjamin Schubert <contact@benschubert.me>2020-07-04 17:32:18 +0000
committerbst-marge-bot <marge-bot@buildstream.build>2020-07-06 18:07:53 +0000
commit46556cb03d4f5ddfd36cada6c92c5030e45f3447 (patch)
tree1f5592f7d081521c550679ab95da1cead3537afa /src/buildstream/_scheduler/scheduler.py
parent472e3d165df3f9866c0665d4f3ffa19f864d33a4 (diff)
downloadbuildstream-46556cb03d4f5ddfd36cada6c92c5030e45f3447.tar.gz
scheduler.py: Pass all 'retry' operations through the state
Stop using 'Notifications' for retries, the state is the one handling the callbacks required for every change in status of elements
Diffstat (limited to 'src/buildstream/_scheduler/scheduler.py')
-rw-r--r--src/buildstream/_scheduler/scheduler.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/buildstream/_scheduler/scheduler.py b/src/buildstream/_scheduler/scheduler.py
index 38d656623..1a4ac2e2c 100644
--- a/src/buildstream/_scheduler/scheduler.py
+++ b/src/buildstream/_scheduler/scheduler.py
@@ -63,7 +63,6 @@ class NotificationType(FastEnum):
SUSPEND = "suspend"
UNSUSPEND = "unsuspend"
SUSPENDED = "suspended"
- RETRY = "retry"
# Notification()
@@ -146,6 +145,7 @@ class Scheduler:
self._notifier = notifier
self.resources = Resources(context.sched_builders, context.sched_fetchers, context.sched_pushers)
+ self._state.register_task_retry_callback(self._failure_retry)
# run()
#
@@ -583,8 +583,6 @@ class Scheduler:
self.jobs_suspended()
elif notification.notification_type == NotificationType.UNSUSPEND:
self.jobs_unsuspended()
- elif notification.notification_type == NotificationType.RETRY:
- self._failure_retry(notification.job_action, notification.element)
else:
# Do not raise exception once scheduler process is separated
# as we don't want to pickle exceptions between processes