Use correct time.sleep argument.
Use the correct time.sleep argument when sleeping. Also replace a post for loop if check with an else to make the code more readable. Change-Id: Icdfb41d1436abe930e4f45243ff6fe378ba3f91b
This commit is contained in:
parent
8aedf19c83
commit
34cdbeb3ca
@ -260,10 +260,9 @@ class Stream(object):
|
|||||||
# function that does this.
|
# function that does this.
|
||||||
self.log.exception(
|
self.log.exception(
|
||||||
"Elastic Search not responding on attempt %d" % i)
|
"Elastic Search not responding on attempt %d" % i)
|
||||||
time.sleep(NUMBER_OF_RETRIES)
|
time.sleep(SLEEP_TIME)
|
||||||
continue
|
continue
|
||||||
|
else:
|
||||||
if i == NUMBER_OF_RETRIES - 1:
|
|
||||||
elapsed = format_timedelta(datetime.datetime.now() - started_at)
|
elapsed = format_timedelta(datetime.datetime.now() - started_at)
|
||||||
msg = ("Console logs not available after %ss for %s %d,%d,%s" %
|
msg = ("Console logs not available after %ss for %s %d,%d,%s" %
|
||||||
(elapsed, job.name, event.change, event.rev,
|
(elapsed, job.name, event.change, event.rev,
|
||||||
|
Loading…
Reference in New Issue
Block a user