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

Saved state #5

Open
astrobokonon opened this issue Feb 1, 2020 · 3 comments
Open

Saved state #5

astrobokonon opened this issue Feb 1, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@astrobokonon
Copy link
Member

Save the state of the print currently being monitored to a json file on disk (or something) to allow persistence of info between code restarts. Only way to avoid duplicate notices.

Could make the file a sort of snapshot of progress/parameters, too, which might be nice. Needs a little more thought.

@astrobokonon astrobokonon added the enhancement New feature or request label Feb 1, 2020
@astrobokonon astrobokonon self-assigned this Feb 1, 2020
@astrobokonon
Copy link
Member Author

Going to start with just a json dump of the notices, with the print job UUID thrown in for good measure. That should give a pretty easy way to see if we were already monitoring a job, and an easy way to discard things if the UUIDs don't match. Will probably store the last percentage and job time too because it's easy enough.

@astrobokonon
Copy link
Member Author

Turns out this is also wrapped up with issue #1 since I'll need to keep close tabs on printer state changes to figure out the database query times.

@astrobokonon
Copy link
Member Author

This is probably best accomplished using a class to represent the states rather than the simple dict I have; that way I can more easily store things.

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

No branches or pull requests

1 participant