billmania / roboquest_core

The backend functionality for the RoboQuest project
1 stars 0 forks source link

Monitor configuration.json with updater.py #56

Closed billmania closed 10 months ago

billmania commented 10 months ago

This will be VERSION 10.

The file configuration.json is sometimes corrupted, usually after an unclean shutdown. See rq_ui Issue 112.

At startup and then continuously monitor the state of configuration.json, looking for:

  1. missing file
  2. empty file
  3. corrupt file

When any of those conditions exist, log them in updater.log. If they occur at startup, then attempt to correct the issue by restoring configuration.json from configuration.json.old. If they occur while the containers are running, just log them without attempting to restore, to avoid a conflict with the rq_ui container.