Python Forum
Restarting Waitress? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html)
+--- Thread: Restarting Waitress? (/thread-19665.html)



Restarting Waitress? - Wittermore - Jul-09-2019

I'm using Waitress to serve Python/Flask web pages on CentOS.

I'm using an HTML template file in the templates folder. When I change the HTML template file, and refresh the main page in my web app, the changes made in the template are not visible.

I'm assuming I need to restart Waitress to force the changes to the template file to be rendered.

So what is the correct way to restart Waitress?


RE: Restarting Waitress? - Larz60+ - Jul-09-2019

You may want to contact authors of waitress here: [email protected]


RE: Restarting Waitress? - Wittermore - Jul-10-2019

Thank you. I have contacted them. Will update this thread with any response...


RE: Restarting Waitress? - noisefloor - Jul-13-2019

Hi,

this behaviour is not specific for Waitress, is applies to all WSGI servers unless you set them to "dev" mode (if existing).

Generally speaking, files are read at the start of the server and will _not_ be watched for changes. Thus, you need to restart your server in order to restart your WSGI application to make any changes visible. Does apply to changes in the Python code as well.

Regards, noisefloor