Skip to content
This repository has been archived by the owner on Nov 11, 2019. It is now read-only.

Change worker register endpoints #62

Merged
merged 10 commits into from
Mar 29, 2019
Merged

Change worker register endpoints #62

merged 10 commits into from
Mar 29, 2019

Conversation

zhengyao-lin
Copy link
Member

@zhengyao-lin zhengyao-lin commented Mar 28, 2019

Resolves #61
Worker side PR illinois-cs241/broadway-grader#25

The db model is slightly different from the one in the issue description.
I kept the _id field but used mongo's upsert to update/insert new/existing workers.
So it's probably incompatible to the old model and we may need to drop the original worker_node collection before deploying(which should be fine?).

On the worker side, I also enforced the use of "heartbeat" field responded by api to make sure workers and api agree on the same heartbeat interval.

Another minor change: in api's router, id_regex allows digits in this branch. Not sure if there is any problem with that.

@zhengyao-lin
Copy link
Member Author

fixed!

@zhengyao-lin zhengyao-lin requested a review from ayushr2 March 28, 2019 21:30
@illinois-cs241 illinois-cs241 deleted a comment from coveralls Mar 28, 2019
tests/unit/test_daos.py Outdated Show resolved Hide resolved
@zhengyao-lin
Copy link
Member Author

tests fixed

tests/base.py Show resolved Hide resolved
@zhengyao-lin zhengyao-lin requested a review from ayushr2 March 29, 2019 22:01
Copy link
Contributor

@ayushr2 ayushr2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Good job!

@zhengyao-lin zhengyao-lin merged commit 7b13f5e into master Mar 29, 2019
@zhengyao-lin zhengyao-lin deleted the worker-id branch March 29, 2019 23:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants