Merge "Don't update node request in assign handlers loop"
This commit is contained in:
commit
682f4c767a
|
@ -156,10 +156,6 @@ class PoolWorker(threading.Thread, stats.StatsReporter):
|
|||
req_count + 1, len(requests), elapsed)
|
||||
return False
|
||||
|
||||
req = self.zk.getNodeRequest(req.id)
|
||||
if not req:
|
||||
continue
|
||||
|
||||
# Only interested in unhandled requests
|
||||
if req.state != zk.REQUESTED:
|
||||
continue
|
||||
|
@ -263,6 +259,11 @@ class PoolWorker(threading.Thread, stats.StatsReporter):
|
|||
log.debug("Request is in state %s", req.state)
|
||||
continue
|
||||
|
||||
# Skip it if we've already declined
|
||||
if self.launcher_id in req.declined_by:
|
||||
log.debug("Request is already declined")
|
||||
continue
|
||||
|
||||
if not reasons_to_decline:
|
||||
# Got a lock, so assign it
|
||||
log.info("Assigning node request %s" % req)
|
||||
|
|
Loading…
Reference in New Issue