Config to db
I havent tested with SQL at all, since I have no need to support that. I provided filler SQL functions which might be more or less what is needed.
I wonder if this is beneficial to store in the database since they are just "high water marks". I am thinking just create a new file to store this. (highwatermark.yaml or timestamp.yaml) Its separate from config so makes sense to have a separate file. The nice thing about having it in a file is also the ability to easily reset the value. You can just delete the file to have it reset back to zero or if you know the value you want to start at you can just update that file without trying to update SQL or BoltDB directly. I have done that before where I forgot to add an employee to the config list and wanted to go back in time to pull their stats.
Hi! That is a very good idea. I guess ideally we'd try to follow the 12-factor-app design pattern, part of which is designing software components to not depend on any writable disk access, such as config- or highwatermark-files.
But given the ease of implementation, that might be a better idea in this case. I am running this in a simple Linux VM with systemd, and just need visibility into our worklogs.