Skip to content

Commit

Permalink
Remove sleep time in state_writer
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed May 15, 2012
1 parent b9c69f2 commit c8408a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
setup( setup(
name="taskmaster", name="taskmaster",
license='Apache License 2.0', license='Apache License 2.0',
version="0.4.1", version="0.4.2",
description="", description="",
author="David Cramer", author="David Cramer",
author_email="dcramer@gmail.com", author_email="dcramer@gmail.com",
Expand Down
3 changes: 2 additions & 1 deletion src/taskmaster/controller.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ def state_writer(self):
last_job_id = None last_job_id = None
with open(self.state_file, 'w') as fp: with open(self.state_file, 'w') as fp:
while self.server.is_alive(): while self.server.is_alive():
gevent.sleep(0.01)
try: try:
job_id, job = self.server.first_job() job_id, job = self.server.first_job()
except IndexError: except IndexError:
Expand All @@ -93,6 +92,8 @@ def state_writer(self):


last_job_id = job_id last_job_id = job_id


gevent.sleep(0)

def reset(self): def reset(self):
if path.exists(self.state_file): if path.exists(self.state_file):
unlink(self.state_file) unlink(self.state_file)
Expand Down

0 comments on commit c8408a1

Please sign in to comment.