Skip to content

Commit

Permalink
Builder: Fixes for Pilot
Browse files Browse the repository at this point in the history
There needs to be a response to all queries.
Also fixed clearing out of old tasks.
  • Loading branch information
skyjake committed Dec 27, 2011
1 parent 263705d commit dd470aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions distrib/pilot.py
Expand Up @@ -171,13 +171,13 @@ def clientId(self):

def newTasksForClient(self):
"""Returns the tasks that a client should work on next."""

self.respond({ 'tasks': listTasks(self.clientId(), includeCompleted=False), 'result': 'ok' })

def doAction(self):
act = self.request['action']
if act == 'complete_task':
completeTask(self.request['task'], self.clientId())
self.respond({ 'result': 'ok', 'did_action': act })
else:
raise Exception("Unknown action: " + act)

Expand Down Expand Up @@ -245,7 +245,7 @@ def handleCompletedTasks():
"""Check the completed tasks and see if we should start new tasks."""

while True:
tasks = listTasks(onlyCompleted=True)
tasks = listTasks(allClients=True, onlyCompleted=True)
if len(tasks) == 0: break

task = tasks[0]
Expand Down

0 comments on commit dd470aa

Please sign in to comment.