Open Kirisannn opened 1 week ago
When the server stops, cleanup the weather data cache and temp JSON.
REQUIREMENTS
If server stops due to crashing, maintain weather_db_cache.json.
If server stops due to ctrl+c, delete weather_db_cache.json
In both cases, delete temp.json.
Implemented server crash handling by deleting temp.json if it exists whenever the server starts. But weather_db_cache.json will only be deleted on a graceful shutdown such as default kill or ctrl+c.
temp.json
weather_db_cache.json
kill
ctrl+c
When the server stops, cleanup the weather data cache and temp JSON.
REQUIREMENTS
If server stops due to crashing, maintain weather_db_cache.json.
If server stops due to ctrl+c, delete weather_db_cache.json
In both cases, delete temp.json.