illinois-cs241 / broadway

A distributed systems framework used running distributable workloads.
Other
18 stars 0 forks source link

Grading job sse #32

Closed jhenhapl closed 3 years ago

jhenhapl commented 4 years ago

Created an endpoint that uses SSE to send events about the queue position and grading state for the given job ID.

State change events are sent when a job starts and when it finishes or fails.

endpoint: /api/v1/stream/[course_id]/[job_id] The Server-Sent events are sent with the event status_update. JSON format:

{
  "type": [update type],
  "data": [relevant data]
}

Example blobs:

{
  "type": "state",
  "data": "FINISHED"
}
{
  "type": "position",
  "data": 10
}

Example SSE: event: status_update\ndata: {"type": "state", "STARTED"}\n\n

Xiangmingchen commented 4 years ago

The rest LGTM 😃, just need some testing

Xiangmingchen commented 3 years ago

Actually can you take a look at why the tests failed?

jhenhapl commented 3 years ago

Actually can you take a look at why the tests failed?

It looks like there's something else wrong. https://travis-ci.com/github/illinois-cs241/broadway/builds/206828424 the previous commit was passing a few days but fails now that I re-ran it.

ezhang887 commented 3 years ago

Actually can you take a look at why the tests failed?

It looks like there's something else wrong. https://travis-ci.com/github/illinois-cs241/broadway/builds/206828424 the previous commit was passing a few days but fails now that I re-ran it.

The integration tests are even failing on the latest commit in master (I triggered a re-run). #33 should fix it. Can you pull from master once that's merged? @jhenhapl

Xiangmingchen commented 3 years ago

All good! Feel free to merge 😉