> It is obvious that if the application is running I would like to work
> without interruption.
> At the same time I want to make changes to it.
> So I type inside start.py (my uWSGI app):
>
> uwsgi.register_signal(1, "workers", uwsgi.reload)
> uwsgi.add_file_monitor(1, './start.py')
>
> That way, if I make changes uWSGI reload the application.
>
> However, if you commit a typo before the above lines of code, of course,
> the application will be reloaded, I see traceback in the logs, but after
> fixing the error no longer reload again.
> Although correct the error, I get HTTP500. Of course, if I find the PID of
> the application and send HUP is ok.
> That's why I register a signal in the first lines of code.
> Despite this "IndentationError: unexpected indent" and I have to restart
> the application manually :/
>
> At the beginning I thought it would be good to uWSGI periodically try to
> run the application
> when "unable to load the app mountpoint =".
>
> But if nothing changes in the code, it is unlikely that the error will
> disappear itself. Unless cause of the error is lack of some module that
> was installed during, or other error code independent.
>
> It would be nice to be able to set the interval at which uWSGI will be
> renewed attempt to run the application.
>
> Later I thought that would be good to be able to register the signals
> already from the configuration.
>
> ini eg:
> [uwsgi]
> register_signal = 1;workers;uwsgi.reload
> add_file_monitor = 1;start.py
>
> or something similar...
>
> Enough to me:
> reload_on_change = start.py[;...]
>
>

What about using --touch-reload ? It is independent by your app
code/status (it is managed by the master) and in the 1.0 branch you can
specify an unlimited list of file to monitor.


-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to