TeamOctolings/Octobot

Data may be lost if the bot shuts down unexpectedly

Octol1ttle opened this issue · 0 comments

Description

If the bot or the machine it is running on shuts down unexpectedly (e.g. SIGKILL or pulling the power plug), guild and member data may be lost because it is only saved on a clean shutdown. I propose that either data gets saved when it is changed (hard to implement since it requires keeping track of changes) or on a set interval (e.g. 5 minutes) (trivial to implement and will work in 99% of situations)

Reproduction Steps

  1. Change some guild settings or add some reminders
  2. SIGKILL the bot process
  3. Restart the bot and see that changes are undone or reminders are gone

Expected behavior

Changes that are old enough should not be lost

Actual behavior

All changes since last bot shutdown are lost

Known Workarounds

No response

Configuration

Среда выполнения:
OS Name: arch
OS Version:
OS Platform: Linux
RID: arch-x64
Base Path: /usr/share/dotnet/sdk/7.0.110/

Host:
Version: 7.0.10
Architecture: x64
Commit: a6dbb800a4

Other information

No response