[PYTHON] Reload the server set up with gunicorn when changing the code

When I was developing the flask app for GAE at hand, I wondered how to do a hot reload for a moment.

answer

Specify reload: True in the --reload boot option or configuration file for gunicorn.

Why was this article born?

It seems that old knowledge was cached, and I thought that gunicorn had to make a reload configuration using watchdog or something, but it was shocked because --reload was normally implemented. is. It was added in 2014 when I looked at the changelog. I was mainly writing web applications in python until around 2014, and after that I switched to ruby, but it was appropriate for my knowledge, "This knowledge is more than a year ago. I want a function that recommends.

Recommended Posts

Reload the server set up with gunicorn when changing the code
Set up a Samba server with Docker
When changing the table name with flask_migrate
VS Code freezes & PC crashes when I start the server with go
Set up a simple HTTPS server with asyncio
Set up a local server with Go-File download-
[Vagrant] Set up a simple API server with python
When it is troublesome to set up an SMTP server locally when sending mail with Python.
Set up a web server with CentOS7 + Anaconda + Django + Apache
When you access the web server, L Chika with Arduino
Check the code with flake8
Settings to be made when starting up the linux server centos7
Decrypt the QR code with CNN
Set up social login with Django
Set up pygit2 with static link
Try the Taxii server (3.gunicorn settings)
Send mail with mailx to a dummy SMTP server set up with python.
Edit the file of the SSH connection destination server on the server with VS Code
Set up reverse proxy to https server with CentOS Linux 8 + Apache mod_ssl
Impressions and memorandums when working with VS code for the first time
When you access the web server, L Chika (HTTPS compatible) with Arduino
Set up a server that processes multiple connections at the same time
[Python] Set the graph range with matplotlib
Behavior when returning in the with block
How to set the server time to Japanese time
[Python] Round up with just the operator
Set up a mail server using Twisted
Set the xticklabels color individually with matplotlib