summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames E. Blair <jeblair@hp.com>2014-12-17 14:58:48 -0800
committerJames E. Blair <jeblair@hp.com>2014-12-17 14:58:48 -0800
commit19af58f637af64e94ef2d46e8b27ed119db3fbea (patch)
tree6bab7190dc7465d62280045f7fcfe823bfd798f2
parent7bad8c1b9275bfacc47e7d5b8ba5abb6204a0c21 (diff)
downloadgear-19af58f637af64e94ef2d46e8b27ed119db3fbea.tar.gz
Fix accounting bug when peeking for job
When peeking to see if a job is available, we erroneously would mark the job as running. This likely resulting in a small bug in job accounting as one more job than was actually running for a given function might be reported. Also, statsd data would have been emitted when not strictly necessary. Change-Id: I741a1a1bebef822d42ad0f27342d40b37b5e1778
-rw-r--r--gear/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gear/__init__.py b/gear/__init__.py
index fd8ad09..531944c 100644
--- a/gear/__init__.py
+++ b/gear/__init__.py
@@ -2718,8 +2718,8 @@ class Server(BaseClientServer):
queue.remove(job)
connection.related_jobs[job.handle] = job
job.worker_connection = connection
- job.running = True
- self._updateStats()
+ job.running = True
+ self._updateStats()
return job
return None