Allow multiple sources for files to check in autoreload
|Reported by:||groves||Owned by:||nobody|
|Component:||Core (Management commands)||Version:||master|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||yes||Needs documentation:||yes|
|Needs tests:||no||Patch needs improvement:||no|
I've got a set of data files that I read when my Django app starts, after which I cache them for the rest of the run. I'd like for a change to one of those files to cause the autoreloader to do its thing. To accomplish this, I added a list of source functions to autoreload that are called in turn whenever the autoreloader runs. The functions are expected to return a sequence of files for mtime checking. The initial sources list just contains a function that does the current listing of all files in sys.modules.
This could probably use some documentation, but I don't think anything in autoreload.py itself makes sense. It seems like it'd be more appropriate somewhere user visible on the site, but I'm not sure where that would be exactly. If someone would point me to the right file, I'll happily add some documentation to the patch.
Change History (8)
comment:1 Changed 9 years ago by
|Triage Stage:||Unreviewed → Design decision needed|