Add options to change reload interval and ignore sys.modules #15

Open
opened 2018-10-29 17:25:17 +00:00 by rtyler · 1 comment
Owner

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: 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
Owner

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.

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.
Sign in to join this conversation.
No Label
defect
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: rtyler/chucktesta#15
No description provided.