ps2alerts / aggregator

Websocket client which subscribes and processes data from the Census Streaming Service, passing it to the PS2Alerts API via RabbitMQ.
https://ps2alerts.com
GNU General Public License v3.0
13 stars 3 forks source link

Add maintenance mode handling #269

Open Maelstromeous opened 3 years ago

Maelstromeous commented 3 years ago

Right now, to handle PS2 maintenance I have to turn off the Aggregator manually, and there's no reflection of PS2 maintenance on the website.

In order to do this, will likely have to add an authority to check a table to see if any records match the current time. Each record needs "has passed" flag, so we can query for windows that have not passed, check the start time and end time and see if current time is within that window.

When we are in maintenance, the following needs to happen:

  1. Stop all active alerts (PS2 server should stop it anyway via metagame event ends but it has beenknown for them to be missed)
  2. Disconnect from the websocket if all servers are down

When server comes out of maintenance (or any server) we need to reconnect.

The API also needs to track this and return a simple True or False to then be picked up by the website.

microwavekonijn commented 3 years ago

Did the serviceState event not work? Also the websocket remains online during maintenance, so there is no need to diconnect as far as I know.

Maelstromeous commented 3 years ago

I'll be using service state to drive this. At the very least I'll need to disable the "stale connection watcher service" during maintenance as it'll trigger constantly due to there being no messages.

On Fri, 22 Jan 2021, 13:15 microwavekonijn, notifications@github.com wrote:

Did the serviceState not work? Also the websocket remains only during maintenance, so there is no need to diconnect as far as I know.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ps2alerts/aggregator/issues/269#issuecomment-765388455, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANRTOQXPUZINTYF72CG7XLS3F263ANCNFSM4WONGETA .