우도비

uwsgi 사용시 소스코드 자동갱신 본문

linux/nginx

uwsgi 사용시 소스코드 자동갱신

오성민 2017. 6. 3. 12:30

http://uwsgi-docs.readthedocs.io/en/latest/Snippets.html


Python Auto-reloading (DEVELOPMENT ONLY!)

In production you can monitor file/directory changes for triggering reloads (touch-reload, fs-reload...).

During development having a monitor for all of the loaded/used python modules can be handy. But please use it only during development.

The check is done by a thread that scans the modules list with the specified frequency:

[uwsgi]
...
py-autoreload = 2

will check for python modules changes every 2 seconds and eventually restart the instance.

And again:

Warning

Use this only in development.


Comments