Skip to content

Commit 4e72e33

Browse files
author
Jeny Sadadia
committed
src/scheduler: schedule a job retry
Get `retry_counter` information from the event a schedule a job retry. Signed-off-by: Jeny Sadadia <[email protected]>
1 parent 6bdd4d7 commit 4e72e33

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/scheduler.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ def _stop(self, sub_id):
109109
self._api_helper.unsubscribe_filters(sub_id)
110110
self._cleanup_paths()
111111

112-
def _run_job(self, job_config, runtime, platform, input_node):
112+
def _run_job(self, job_config, runtime, platform, input_node, retry_counter):
113113
try:
114114
node = self._api_helper.create_job_node(job_config,
115115
input_node,
116-
runtime, platform)
116+
runtime, platform, retry_counter)
117117
except KeyError as e:
118118
self.log.error(' '.join([
119119
input_node['id'],
@@ -371,7 +371,8 @@ def _run(self, sub_id):
371371
if not self._verify_architecture_filter(job, input_node):
372372
continue
373373
if self._api_helper.should_create_node(rules, input_node):
374-
self._run_job(job, runtime, platform, input_node)
374+
retry_counter = event.get('retry_counter', 0)
375+
self._run_job(job, runtime, platform, input_node, retry_counter)
375376

376377
return True
377378

0 commit comments

Comments
 (0)