Commit Graph

8 Commits

Author SHA1 Message Date
D. Berge
13da38b4cd Make websocket notifications await.
Not sure if this helps much. It might help with avoiding
out of order notifications and reducing the rate at which
the clients get spammed when importing database dumps and
such, but that hasn't been tested.
2021-05-24 15:52:29 +02:00
D. Berge
eb6329e6f7 Catch DB connection errors.
If we can't connect straight away (either first time
or after a disconnection), keep retrying until we
manage.
2020-10-06 19:44:07 +02:00
D. Berge
2486cb3944 Monitor for disconnection from DB.
The events listener now listens to the 'end' event from
the PostgreSQL driver and will attempt to reconnect if
we get disconnected.
2020-10-06 19:22:56 +02:00
D. Berge
77ff9a047c Pass a different copy of the data to each listener 2020-09-28 23:07:27 +02:00
D. Berge
7758f08a79 Use array instead of set for storing callbacks 2020-09-28 21:33:16 +02:00
D. Berge
ab2cf81327 Broadcast an already parsed JSON payload 2020-09-25 18:26:04 +02:00
D. Berge
5c8f8023d6 Remove debug statement 2020-09-04 01:33:18 +02:00
D. Berge
52907921f1 Add websocket server to emit DB notifications 2020-09-04 01:33:18 +02:00