Permalink
Browse files

Remove sleep time in state_writer

  • Loading branch information...
1 parent b9c69f2 commit c8408a10b8995cb74d8c7734fba19b6269db5486 @dcramer committed May 15, 2012
Showing with 3 additions and 2 deletions.
  1. +1 −1 setup.py
  2. +2 −1 src/taskmaster/controller.py
View
@@ -5,7 +5,7 @@
setup(
name="taskmaster",
license='Apache License 2.0',
- version="0.4.1",
+ version="0.4.2",
description="",
author="David Cramer",
author_email="dcramer@gmail.com",
@@ -80,7 +80,6 @@ def state_writer(self):
last_job_id = None
with open(self.state_file, 'w') as fp:
while self.server.is_alive():
- gevent.sleep(0.01)
try:
job_id, job = self.server.first_job()
except IndexError:
@@ -93,6 +92,8 @@ def state_writer(self):
last_job_id = job_id
+ gevent.sleep(0)
+
def reset(self):
if path.exists(self.state_file):
unlink(self.state_file)

0 comments on commit c8408a1

Please sign in to comment.