From bb681360fcbcbb9a9b53f7e0fc02a752996a3cf3 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 7 May 2015 10:29:26 -0700 Subject: Fix regression in wakeConnections In d5e03ac9307c9cc6f79fc22f15e177d3662dc936, an optional argument to wakeConnections was added so that only connections related to a job would be awoken. However, the default value, None, meant that no connection would be awoken. This doesn't make much sense, and indeed, Zuul, in its unit tests, was relying on all connections being awoken. Fix this by awakening all connections if the job argument is None (which never happens within gear itself). Change-Id: Ib7632ae0353c414cc1b68dbe430cb57292058012 --- gear/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gear/__init__.py b/gear/__init__.py index b4306a4..51c0c91 100644 --- a/gear/__init__.py +++ b/gear/__init__.py @@ -2950,7 +2950,8 @@ class Server(BaseClientServer): p = Packet(constants.RES, constants.NOOP, b'') for connection in self.active_connections: if connection.state == 'SLEEP': - if job and job.name in connection.functions: + if ((job and job.name in connection.functions) or + (job is None)): connection.changeState("AWAKE") connection.sendPacket(p) -- cgit v1.2.1