Add options to change reload interval and ignore sys.modules #15
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Author: @AdamG Posted at: 30.08.2010 19:35
sha: 50e83479c887654425dc89fe4f2a970ee8b690ba
I'm not quite happy with this change - it seems to me that watching sys.modules should be a default-true option of its own - but it maintains backwards compatibility while allowing the use case that I needed - watching a particular file while ignoring sys.modules.
The reason for not watching sys.modules is just to avoid len(sys.modules) * child processes * num spawning instances stat calls every second. --reload-interval has the same purpose.
Author: @AdamG Posted at: 27.04.2011 09:13
The original commit is way out of date now, especially with the source-dir-renaming thing. Here's an updated patch:
http://static.gomaa.us/adam/patches/spawning-2011-04-27-watch-single-file.patch
It removes the passing of --reload to children, since that was ignored by the spawning_child code. Instead, watching sys.modules only happens if you pass --reload=dev. If you pass only --watch=whatever, only that file is watched (currently, sys.modules would be watched as well). Both reload and watch can be used to get the current sys.modules + watched file behavior.