Merge "Don't update node request in assign handlers loop"

This commit is contained in:
Zuul 2023-03-15 14:58:30 +00:00 committed by Gerrit Code Review
commit 682f4c767a
1 changed files with 5 additions and 4 deletions

View File

@ -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)