Closed Menace-Dennis closed 3 years ago
Hi @Menace-Dennis Nice catch, I'll have to look into fixing this. Alternatively, PRs are always welcome 😉 Cheers, Alex.
Even more, if you upload it manually it doesn't refresh, I have a file with prints jobs since march, reinstalled octoprint, reinstalled the plugin, scp the octoprint_stats.json back to to logs folder. Restarting octoprint Result = nothing displayed. Starting a print, going back to Stats tab, only have the current connections and the last print since reinstall. Inspecting the file trough ssh, everything is there, new connections and new print job logged to the file. Restarting the octoprint server, again, going to Stats tab, select last year, I only see last print and last connections since reinstall.
Even more, if you upload it manually it doesn't refresh, I have a file with prints jobs since march, reinstalled octoprint, reinstalled the plugin, scp the octoprint_stats.json back to to logs folder. Restarting octoprint Result = nothing displayed.
Starting a print, going back to Stats tab, only have the current connections and the last print since reinstall. Inspecting the file trough ssh, everything is there, new connections and new print job logged to the file. Restarting the octoprint server, again, going to Stats tab, select Last Year, Last 6 months, etc, I only see last print and last connections since reinstall.
Update: Selecting Current Year and data appeared. Looks like it takes a lot of time to process the file. Also I get this warning in logs: py.warnings - WARNING - /home/pi/Octoprint/lib/python3.7/site-packages/octoprint_stats/init.py:653: FutureWarning: Indexing with multiple keys (implicitly converted to a tuple of keys) will be deprecated, use a list instead.
G'Day @Menace-Dennis As of the most recent version (3.1.2) I can confirm that the data is now backed up. Cheers, Alex.
The database is stored in logs rather than in data meaning that the .json isn't backed up through the OctoPrint backup plugin.