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
d40ceb8343
Refactor list of notification channels into its own file
2021-05-24 13:38:19 +02:00
D. Berge
92210378e1
Listen for and broadcast info notifications
2021-05-20 18:21:01 +02:00
D. Berge
ba8eeb82d3
Listen for planner events
2020-10-09 13:55:34 +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
746e3405fb
Let websocket listen to all DB notification channels
2020-10-02 00:39:53 +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
bfcc02a140
Comment out logging statement
2020-09-27 19:19:47 +02:00
D. Berge
ab2cf81327
Broadcast an already parsed JSON payload
2020-09-25 18:26:04 +02:00
D. Berge
d285a63746
Remove debug statements
2020-09-06 21:00:06 +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