-
Notifications
You must be signed in to change notification settings - Fork 1
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
queues are empty after code change #2
Comments
Thank you for the report. Now investigating. |
What do you think of an implementation that stores emulator state in pickle files? The memory-based implementation would still be availble. Advantages
Disadvantages
|
The best situation would be to replicate behaviour of the old python2 dev_appserver. So when you explicitly would restart your flask_server, it is not a problem that it forgets all tasks. I'm curious how the dev_appserver did that. |
Flask uses Werkzeug which does not reload code. It completely restarts the process when it detects a code change. (Source code). I could save queue state at exit, and reload on initialization. This would mean a temp file, but only used for "hibernating" , not as the regular place to hold state. This solution would mean that state is also preserved across intentional restarts. Does that make sense? |
@anoteboom I implemented the "hibernate" approach. It can be turned off with |
When I'm debugging code, as soon as i change something, flask does a reload., and all queues are empty again.
I think I'm going back to the separate process for a task emulator. Or do you have an idea of how to keep the queues?
The text was updated successfully, but these errors were encountered: