flower
flower copied to clipboard
Add ability to dump and restore state counter from persistent database (shelve)
When use persistent=True
to dump state to the file, counter data is not dumped.
Therefore after restoring from the file, on dashboard we do not see any statistics, everything is 0.
To add ability to store counter along with the state, __reduce__
method was overridden and __init__
to accept counter.
Note: we can try to restore from kwargs
but for these we need to create __new__
constructor for EventState class and add additional magic method (as shelve is using protocol 3 by default)
Fixes #787 partially (dashboard issue)
I hope this get merged once
@mher , please, merge this.
merge this
Very soon it will be anniverasy of 5 years 🎉