wiseoldman-discord-bot icon indicating copy to clipboard operation
wiseoldman-discord-bot copied to clipboard

Add maintenance mode

Open psikoi opened this issue 1 year ago • 0 comments

We need a way to shut the bot down when our API is down, this can be done in two ways:

Hands off approach

  • Ping https://api.wiseoldman.net/v2/ every minute or so, check if it doesn't return a 200 status code
    • If it gets more than X negative pings in a row, turn on "maintenance mode" and respond with a generic message
  • No manual input from me needed, i could be asleep!

Hands on

  • Read a MAINTENANCE_MODE_ENABLED env var, and respond with a generic message
  • Requires me to log on to the server, update the env vars, restart the bot container

psikoi avatar Feb 28 '24 12:02 psikoi