search by tags

for the user

adventures into the land of the command line

gunicorn hot reloads

with the reload option in the gunicorn daemon process, you can make hot reloads...

$ gunicorn --workers 1 --bind 0.0.0.0:5001 --reload main:app

i just learnt about it...

[2019-03-23 21:51:19 +0000] [7483] [INFO] Worker exiting (pid: 7483)
[2019-03-23 21:51:19 +0000] [7473] [INFO] Shutting down: Master
[2019-03-23 21:51:19 +0000] [7473] [INFO] Reason: Worker failed to boot.
[2019-03-23 21:52:05 +0000] [7505] [INFO] Starting gunicorn 19.3.0
[2019-03-23 21:52:05 +0000] [7505] [INFO] Listening at: http://0.0.0.0:5001 (7505)
[2019-03-23 21:52:05 +0000] [7505] [INFO] Using worker: eventlet
[2019-03-23 21:52:05 +0000] [7516] [INFO] Booting worker with pid: 7516
.
.
.
[2019-03-23 21:53:17 +0000] [7516] [INFO] Worker reloading: views/mygroovyview.py modified
[2019-03-23 21:53:17 +0000] [7516] [INFO] Worker exiting (pid: 7516)
[2019-03-23 21:53:17 +0000] [7535] [INFO] Booting worker with pid: 7535