Attempt to fix race condition in return

This is due to our pinging of the minions for job returns, there is a non-zero amount of time between the job showing as "not running" on the minion and showing as recieved by the master. This will only be worse on Syndics-- so I'd recommend not using a 0 timeout value unless you have a small cluser
This commit is contained in:
Thomas Jackson 2014-09-19 14:39:01 -07:00
parent 878ebd37f1
commit 6e93b3b680

View File

@ -1121,7 +1121,11 @@ class LocalClient(object):
)
more_time = True
if not more_time:
break
# set the timeout to a non-zero number, so we can do
# one more iteration to attempt to avoid the race here
# between job finishing and master getting ret
timeout = 1
continue
else:
timeout_at = time.time() + timeout
continue