Skip to content
Snippets Groups Projects
Commit d6f69ab6 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

Task #8598: log waiting time when retrying

parent e8400045
No related branches found
No related tags found
No related merge requests found
...@@ -522,7 +522,9 @@ class IngestPipeline(): ...@@ -522,7 +522,9 @@ class IngestPipeline():
break break
retry += 1 retry += 1
if retry < times: if retry < times:
time.sleep(random.randint(30, 60) * retry) wait_time = random.randint(30, 60) * retry
self.logger.debug('waiting %d seconds before trying %s again' % (wait_time, self.JobId))
time.sleep(wait_time)
if error: if error:
raise PipelineError(errortext + ' tried %s times but failed on %s. Got the following errors: %s' % (retry, self.JobId, error), func.__name__) raise PipelineError(errortext + ' tried %s times but failed on %s. Got the following errors: %s' % (retry, self.JobId, error), func.__name__)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment