Skip to content

Commit

Permalink
Merge pull request #1426 from anujlamoria/gsoc-anuj
Browse files Browse the repository at this point in the history
Fixed typo in broker.py
  • Loading branch information
sgoggins authored Aug 15, 2021
2 parents 7f1b252 + 1c9ed85 commit aa686ae
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions augur/routes/broker.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def task():
for given_component in list(task['given'].keys()):
given.append(given_component)
model = task['models'][0]
logger.info("Broker recieved a new user task ... checking for compatible workers for given: " + str(given) + " and model(s): " + str(model) + "\n")
logger.info("Broker received a new user task ... checking for compatible workers for given: " + str(given) + " and model(s): " + str(model) + "\n")

logger.debug("Broker's list of all workers: {}\n".format(server.broker._getvalue().keys()))

Expand Down Expand Up @@ -128,7 +128,7 @@ def worker():
and telling the broker to add this worker to the set it maintains
"""
worker = request.json
logger.info("Recieved HELLO message from worker {} listening on: https://localhost:{}\
logger.info("Received HELLO message from worker {} listening on: https://localhost:{}\
".format(worker['id'], worker['id'].split('.')[2]))
if worker['id'] not in server.broker:
server.broker[worker['id']] = server.manager.dict()
Expand Down Expand Up @@ -162,7 +162,7 @@ def worker():
def sync_queue():
task = request.json
worker = task['worker_id']
logger.info("Message recieved that worker {} completed task: {}\n".format(worker,task))
logger.info("Message received that worker {} completed task: {}\n".format(worker,task))
try:
models = server.broker[worker]['models']
givens = server.broker[worker]['given']
Expand Down Expand Up @@ -202,7 +202,7 @@ def get_status():
@server.app.route('/{}/workers/remove'.format(server.api_version), methods=['POST'])
def remove_worker():
worker = request.json
logger.info("Recieved a message to disconnect worker: {}\n".format(worker))
logger.info("Received a message to disconnect worker: {}\n".format(worker))
server.broker[worker['id']]['status'] = 'Disconnected'
return Response(response=worker,
status=200,
Expand All @@ -212,7 +212,7 @@ def remove_worker():
def task_error():
task = request.json
worker_id = task['worker_id']
# logger.error("Recieved a message that {} ran into an error on task: {}\n".format(worker_id, task))
# logger.error("Received a message that {} ran into an error on task: {}\n".format(worker_id, task))
if worker_id in server.broker:
if server.broker[worker_id]['status'] != 'Disconnected':
logger.error("{} ran into error while completing task: {}\n".format(worker_id, task))
Expand All @@ -221,4 +221,4 @@ def task_error():
logger.error("A previous instance of {} ran into error while completing task: {}\n".format(worker_id, task))
return Response(response=request.json,
status=200,
mimetype="application/json")
mimetype="application/json")

0 comments on commit aa686ae

Please sign in to comment.