Permalink
Browse files

Dont use nowait as it was unneeded

  • Loading branch information...
1 parent 2acc294 commit e3f5bf25e991bab58ef2feada078584b242e2b5d @dcramer committed May 15, 2012
Showing with 3 additions and 11 deletions.
  1. +1 −1 setup.py
  2. +1 −5 src/taskmaster/cli/master.py
  3. +1 −5 src/taskmaster/consumer.py
View
@@ -5,7 +5,7 @@
setup(
name="taskmaster",
license='Apache License 2.0',
- version="0.4.6",
+ version="0.4.7",
description="",
author="David Cramer",
author_email="dcramer@gmail.com",
@@ -49,11 +49,7 @@ def start(self):
self.shutdown()
def put_job(self, job):
- while True:
- try:
- return self.queue.put_nowait(job)
- except Full:
- gevent.sleep(0)
+ return self.queue.put(job)
def first_job(self):
return self.queue.queue[0]
@@ -100,11 +100,7 @@ def start(self, target):
def get_job(self):
self._wants_job = True
- while True:
- try:
- return self.queue.get_nowait()
- except Empty:
- gevent.sleep(0)
+ return self.queue.get()
def task_done(self):
self.tasks_completed += 1

0 comments on commit e3f5bf2

Please sign in to comment.