Uvicorn: Add `--reload` flag

Created on 29 Jun 2018  Â·  6Comments  Â·  Source: encode/uvicorn

Auto-reloading when code changes

help wanted

Most helpful comment

We now have auto-reloading when --debug is used.

All 6 comments

We now have auto-reloading when --debug is used.

How can I force an auto-reload if I make code changes are deployed in production?
I'm currently setting up an API endpoint using fastapi and deploying it with uvicorn + nginx

You can't,
The reload mode is more intended to be used in development.

On Sun, Dec 20, 2020, 9:07 AM Abhyudaya Srinet notifications@github.com
wrote:

How can I force an auto-reload if I make code changes are deployed in
production?
I'm currently setting up an API endpoint using fastapi and deploying it
with uvicorn + nginx

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/encode/uvicorn/issues/98#issuecomment-748576658, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAINSPWFGYFQANRSK5FLIHLSVWWEXANCNFSM4FHT3UFQ
.

@euri10 how could one automate a deployment for such a case then?

I would subscribe to https://github.com/encode/uvicorn/pull/853

If this lands then we may add another signal, SIGUSR1 comes to mind, for
the restart method of MultiProcess that could be triggered with a kill -1
pid

On Sun, Dec 20, 2020, 11:33 AM Abhyudaya Srinet notifications@github.com
wrote:

how would one automate a deployment for such a case then?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/encode/uvicorn/issues/98#issuecomment-748589812, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAINSPRTTEC5F4J7YU46QETSVXHH5ANCNFSM4FHT3UFQ
.

Thanks, will watch it. Meanwhile, I guess I will have to go with restarting the gunicorn service when code deployments are triggered.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Legionof7 picture Legionof7  Â·  3Comments

rspadim picture rspadim  Â·  5Comments

RobertoPrevato picture RobertoPrevato  Â·  3Comments

tarioch picture tarioch  Â·  4Comments

HenrikOssipoff picture HenrikOssipoff  Â·  5Comments