refactor: Extract watchdog module.

We now have 100% code coverage on this somewhat
fiddly code.

We also break activity's dependency on server_events.
This commit is contained in:
Steve Howell
2021-03-22 12:59:50 +00:00
committed by Tim Abbott
parent d644e42dc1
commit dbf19fe8d7
6 changed files with 106 additions and 26 deletions

View File

@@ -86,8 +86,8 @@ reload itself:
garbage-collected by the server, meaning the browser can no longer
get real-time updates altogether. In this case, the browser
auto-reloads immediately in order to reconnect. We have coded an
unsuspend trigger (based on some clever time logic) that ensures we
check immediately when a client unsuspends; grep for `unsuspend` to
unsuspend callback (based on some clever time logic) that ensures we
check immediately when a client unsuspends; grep for `watchdog` to
see the code.
* If a new version of the server has been deployed, we want to reload
the browser so that it will start running the latest code. However,