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

Implement a better reloader #29

Closed
anandology opened this issue Nov 28, 2010 · 7 comments
Closed

Implement a better reloader #29

anandology opened this issue Nov 28, 2010 · 7 comments
Assignees

Comments

@anandology
Copy link
Member

The current reloader tries to reload modules, it doesn't work well if there is some global state. Things like sessions etc. are not working with the reloader.

We need a new reloader that restarts the whole process when it detects file changes.

@anandology
Copy link
Member Author

Justin has suggested a reloader that restarts the process on code changes.

http://groups.google.com/group/webpy/browse_thread/thread/10e255e2511741b2

caveat: doesn't work on windows

@aaronsw
Copy link
Contributor

aaronsw commented Apr 11, 2011

Reloading the whole process is slow; maybe just have some way to protect global state?

@thinxer
Copy link

thinxer commented May 5, 2011

http://webpy.org/cookbook/session_with_reloader

It seemed that web.config can be used to store global states. It would be better if web.py can handle session with reloader automatically.

@benhoyt
Copy link
Contributor

benhoyt commented Apr 26, 2012

FWIW, we store most of our global state in a file called caches.py, which we almost never change. Then other modules refer to caches.things, and if the other module changes and reloads, we're fine. It's only when we change caches.py itself that we have to (manually) restart the process.

I agree that restarting the whole process is slow. We aggressively cache things in Python objects on startup -- our server takes about 4GB of RAM and a few minutes to start up, so fast reload is very important to us. :-)

@despens
Copy link

despens commented Aug 30, 2012

If the reloader would work with sessions, that would be grand!

@gabrii
Copy link

gabrii commented Nov 4, 2013

It also desn't check canges on modules imported by unchanged modules.
If I have [main.py <- view.py <- render_functions.py] the changes of render_functions.py don't reaload until I modify view.py.

@jekiapp
Copy link

jekiapp commented Feb 4, 2016

having same issue as @gabrii

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

No branches or pull requests

8 participants