Skip to content

Live updates

The issue and pull request pages can update while someone reads them: a comment, a tag or a status change made elsewhere shows up without reloading the page. The web application publishes each change on redis, and the page follows it as server-sent events, from its /pv/.../events URL, which the web application serves too.

To turn them on:

  • Run a redis server, and give its address in REDIS_HOST and REDIS_PORT, or its socket in REDIS_SOCKET (see Redis options).
  • Set LIVE_UPDATES = True in the configuration.

Each open page keeps a connection to the web application. uvicorn (sourcelab_web) holds them at little cost, but under files/sourcelab.wsgi each one takes a thread of the WSGI server. A proxy in front of the application must not buffer these responses: they carry X-Accel-Buffering: no, which nginx follows.

The private issues and the issues and pull requests of private projects don't update live.