Fix inconsistent build task attempt logging

Change-Id: I5fee4782202fc8e5094b2be05e88f70706596078
This commit is contained in:
Kurt Taylor 2017-05-22 08:57:12 -05:00
parent 5e07d045a5
commit d6fd6d8e04
1 changed files with 2 additions and 6 deletions

View File

@ -498,12 +498,8 @@ class WorkerThread(threading.Thread):
for attempt in six.moves.range(self.conf.retries + 1):
if self.should_stop:
break
if attempt > 0:
LOG.info("Attempting to run task %s for the %s time",
task.name, attempt + 1)
else:
LOG.info("Attempting to run task %s for the first"
" time", task.name)
LOG.info("Attempt number: %s to run task: %s ",
attempt + 1, task.name)
try:
task.run()
if task.success: