[Flask] Restarting Flask app?

Alex Hall ahall at autodist.com
Tue May 10 15:26:20 EDT 2016


Great, thanks. So UWSGI is what I'd restart. There must be a way to script
all this, so I don't have to keep doing
sudo uwsgi --ini-paste /etc/uwsgi/apps-enabled/myApp.ini

Great point about not auto-restarting on a production site. For testing
it's super convenient, but you're right, it would be horrible on something
real, especially as I'm in the habbit of hitting ctrl-s every few minutes
no matter whether my code is valid at the moment or not.

On Tue, May 10, 2016 at 3:05 PM, David Lord <davidism at gmail.com> wrote:

> You restart the process running your app, which is uWSGI.  `master` does
> not mean that, it means that you're starting a process that will manage
> other processes.  Although there are solutions for restarting when files
> change, you should always restart manually in production.
>
> On Tue, May 10, 2016 at 12:02 PM, Alex Hall <ahall at autodist.com> wrote:
>
>> Hi all,
>> It just struck me that restarting a Flask app after modifying the Python
>> code isn't obvious. Do I restart UWSGI, Nginx, or both? In UWSGI, I
>> specified "master=true", which I read lets you apply changes without
>> restarting. Therefore, do I need to restart anything, or simply save my
>> changes to the code and watch it happen automatically?
>>
>> --
>> Alex Hall
>> Automatic Distributors, IT department
>> ahall at autodist.com
>>
>> _______________________________________________
>> Flask mailing list
>> Flask at python.org
>> https://mail.python.org/mailman/listinfo/flask
>>
>>
>
> _______________________________________________
> Flask mailing list
> Flask at python.org
> https://mail.python.org/mailman/listinfo/flask
>
>


-- 
Alex Hall
Automatic Distributors, IT department
ahall at autodist.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20160510/b4f7a118/attachment.html>


More information about the Flask mailing list