From b0953032ef941a8552aa74ad1df95d7b6dea4677 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 12 Jun 2013 17:00:36 -0700 Subject: [PATCH] Fix accounting in server 'status' command. The calculations for the number of jobs in the queue and running as reported by 'status' were incorrect. Change-Id: I62bb9583c649b665bacc740a37e8f496f2720fc8 --- gear/__init__.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gear/__init__.py b/gear/__init__.py index 3021731..dde5062 100644 --- a/gear/__init__.py +++ b/gear/__init__.py @@ -2188,13 +2188,10 @@ class Server(BaseClientServer): for function in self.functions: # Total, running, workers functions[function] = [0, 0, 0] - - for queue in [self.high_queue, self.normal_queue, self.low_queue]: - for job in queue: - functions[job.name][0] += 1 for job in self.jobs.values(): functions[job.name][0] += 1 - functions[job.name][1] += 1 + if job.running: + functions[job.name][1] += 1 for connection in self.active_connections: for function in connection.functions: functions[function][2] += 1