When is it necessary to restart the daemon?

28 views
Skip to first unread message

Jim Karsten

unread,
Aug 23, 2022, 9:06:22 PM8/23/22
to py4web
I am running py4web on linux with nginx and have a daemon running. 
At times I find changes to code require the daemon be restarted for the changes to take effect. 
Changes to these files require a restart:
* settings.py
* common.py

While changes to these files do not require a restart:
* controllers
* templates

Is there a way to know what files are loaded by the daemon that would necessitate a restart?

Or is there a way to get changes to settings.py and common.py to take effect without a reload. Or possibly is there a simple way initiate a reload, like with a SIGHUP or some such?

Thanks,
Jim 

Jim Steil

unread,
Aug 24, 2022, 8:52:47 AM8/24/22
to py4web
I tend to restart the py4web process every time I apply changes to my production environment. In fact, I have  a script that I run that applies my updates and then restarts the py4web daemon.

My understanding is that the code in models, common, settings and even controllers is loaded when py4web starts up.  Therefore, any change to any python code would require a py4web restart to reload.  Templates is an exception and are read on each request.

-Jim
Reply all
Reply to author
Forward
0 new messages