summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQinusty <jrsmith9822@gmail.com>2018-08-17 14:29:45 +0000
committerQinusty <jrsmith9822@gmail.com>2018-08-17 14:29:45 +0000
commit30f696f27a4a5281af86d9e41ecc2e4c2ef32ebf (patch)
treeec8e008233b3c85ca5479d268291ce34d38176ef
parentc43af4eb92c453c549dc185090ff5cd80035c3ec (diff)
parent7263ea8c7a8c17432350a5a9af4283e9ded1486f (diff)
downloadbuildstream-30f696f27a4a5281af86d9e41ecc2e4c2ef32ebf.tar.gz
Merge branch 'Qinusty/531-fetch-retries-on-terminate' into 'master'
Prevent jobs retrying on terminate Closes #531 See merge request BuildStream/buildstream!662
-rw-r--r--buildstream/_scheduler/jobs/job.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/buildstream/_scheduler/jobs/job.py b/buildstream/_scheduler/jobs/job.py
index c339a333b..922ce5613 100644
--- a/buildstream/_scheduler/jobs/job.py
+++ b/buildstream/_scheduler/jobs/job.py
@@ -250,7 +250,7 @@ class Job():
#
def resume(self, silent=False):
if self._suspended:
- if not silent:
+ if not silent and not self._scheduler.terminated:
self.message(MessageType.STATUS,
"{} resuming".format(self.action_name))
@@ -549,7 +549,7 @@ class Job():
#
self._retry_flag = returncode not in (RC_OK, RC_PERM_FAIL)
- if self._retry_flag and (self._tries <= self._max_retries):
+ if self._retry_flag and (self._tries <= self._max_retries) and not self._scheduler.terminated:
self.spawn()
return