Course Worker Nodes Endpoint
ayushr2 opened this issue · comments
Define new client endpoint GET /api/v1/worker/[course_id]/all
which shows the worker nodes for a specific course. Currently, all worked nodes are available to all courses but later we can have a quota or some policy as to how much of the grading cluster a course has access to.
This should return:
{
"worker_nodes": [
{
"hostname": <hostname of the machine on which the grader is running>,
"jobs_processed": <number of jobs processed since joining the cluster>,
"busy": <True/False>,
"alive": <True/False>
}, ...
]
}
Can we make this route /api/v1/worker/[course_id]/all
which shows the worker nodes for a specific course?
If that's the same for all courses right now so be it, but I think the name "grading cluster" is a little bit scary for what's actually going on here.
Ideally for sanity the register-worker route would also be at /api/v1/worker
as a POST, but that probably shouldn't be a part of this issue.
Can we make this route
/api/v1/worker/[course_id]/all
which shows the worker nodes for a specific course?If that's the same for all courses right now so be it, but I think the name "grading cluster" is a little bit scary for what's actually going on here.
Updated the issue to reflect this.