Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed typo in broker.py #1426

Merged
merged 2 commits into from
Aug 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")