Add the filepath to the autoreload hook callback. #738

wants to merge 1 commit into


None yet

2 participants


A case that's not handled well today: if we add a hook to run Grunt on file change, it also runs for python changes while this may be only useful for javascript/css files. By passing the path of the file changed, we can do some more testing in the autoreload hook callback.


tornadoweb member

I don't think you want to use autoreload for this. If two files change within half a second of each other (as is common when you do a git pull or checkout), the reload hook will only see one of them before the process restarts. I think ideally you'd use a separate PeriodicCallback to watch your js/css files and run grunt, and separately use autoreload for python files and other things that necessitate a full process restart. Or you can continue using autoreload, but recognize that it's kind of a blunt instrument and you can't tell exactly what changed.


Thanks for the feedback. I'll look into this alternative approach.

@xethorn xethorn closed this Apr 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment