Morphyum / PersistentMap

Server for the persistent war map
GNU General Public License v3.0
2 stars 1 forks source link

BackupWorker #12

Closed IceRaptor closed 6 years ago

IceRaptor commented 6 years ago

Adds a new BackgroundWorker to the server process that periodically writes the files to disk. This allows the save logic to be extract from the Helper, since we'd willing to do these periodically.

Also adds shutdown hooks for various functions that must run on server death.

We should reduce the backup timespan from 24 hours, just to make sure changes are being captured. Given the file size, and the fact that this is an async process, we could probably write them every 5m-30m and be perfectly fine.