Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sshishov
Copy link

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
Copy link
Author

Fixes #787 partially (dashboard issue)

@sshishov sshishov mentioned this pull request Aug 25, 2019
@rmk135
Copy link

rmk135 commented Jun 10, 2020

I hope this get merged once

@rmk135
Copy link

rmk135 commented Jun 10, 2020

@mher , please, merge this.

@SardarDelha
Copy link

merge this

@sshishov
Copy link
Author

Very soon it will be anniverasy of 5 years 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants