fossar / selfoss

multipurpose rss reader, live stream, mashup, aggregation web application
https://selfoss.aditu.de
GNU General Public License v3.0
2.35k stars 343 forks source link

Update: Support sending update status after each source #1428

Closed jtojnar closed 1 year ago

jtojnar commented 1 year ago

This will reduce the chance that the web server will time out due to no response being sent. In the future, we will be able to use the data for displaying a progress bar in the client.

Even though the GET /update endpoint is not actually part of the public API, we increase the API version to 6.0.1 → 6.1.0, and only use the new output when Accept: text/event-stream header is sent with the request, in order to preserve backwards compatibility.

This is using Server-sent events-style response with three event types:

https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events

cc @davidoskky @aminecmi This might be useful for RfS as well.

netlify[bot] commented 1 year ago

Deploy Preview for selfoss canceled.

Name Link
Latest commit 9741e39d1fa4070d4d42e774c8c088da055eaa7b
Latest deploy log https://app.netlify.com/sites/selfoss/deploys/64361284cf825d000982f403