flower icon indicating copy to clipboard operation
flower copied to clipboard

Add ability to dump and restore state counter from persistent database (shelve)

Open sshishov opened this issue 5 years ago • 5 comments

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)

sshishov avatar Aug 24 '19 22:08 sshishov

Fixes #787 partially (dashboard issue)

sshishov avatar Aug 25 '19 00:08 sshishov

I hope this get merged once

rmk135 avatar Jun 10 '20 22:06 rmk135

@mher , please, merge this.

rmk135 avatar Jun 10 '20 22:06 rmk135

merge this

SardarDelha avatar Sep 14 '23 07:09 SardarDelha

Very soon it will be anniverasy of 5 years 🎉

sshishov avatar Mar 19 '24 23:03 sshishov