-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
debug reload no work #3459
Comments
@tkzczen Let's say if you add something like this if __name__ == "__main__":
import time
print(f"Starting at {time.strftime('%X %x %Z')}")
app = make_app()
app.listen(2022)
tornado.ioloop.IOLoop.current().start() and you save the files a few times, do you see the timestamp change ? (example on my system)
|
How exactly are you running this program? Which version of python, tornado, etc? The sample is incomplete (undefined reference to MainHandler1); is anything else missing? |
Before this , I used set settings = { 'debug':True}, The web server been auto restart the code when I change the web server code.But Now, I use |
How exactly are you running it? Just What platform? I'm not sure how well autoreload works on windows. Very old versions of MacOS used to have problems too but as far as I know that was fixed many years ago. It's possible that you're hitting an error before the autoreload starts: If you use the code above you'll get an error for the undefined reference to MainHandler1, and because this is before the app is started with |
I found that the web did not restart due to a problem with my code. In my other code, it is not the same as the example above. I will modify it to application = tornado.web.Application([
(r"/", MainHandler),
(r"/run", MainHandler1),
],**settings)
def make_app():
return application
async def main():
app = make_app()
app.listen(2022)
await asyncio.Event().wait() There are no more issues now |
The text was updated successfully, but these errors were encountered: