Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto-reload / app can't auto reload without import string passed to uvicorn #3

Open
struckchure opened this issue Jul 23, 2023 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@struckchure
Copy link
Owner

struckchure commented Jul 23, 2023

...
uvicorn.run(
   cls.app,
   ...,
   reload=True
)
...
$ python example.py
[23/07/2023, 19:48:56] INFO [Controller] GreetController {/greetings}
[23/07/2023, 19:48:56] INFO [Method] Mapped {/greetings/greet/{pk}/{gID}, GET} route
[23/07/2023, 19:48:56] INFO [Method] Mapped {/greetings/no-greet, POST} route
[23/07/2023, 19:48:56] INFO [Controller] CluthController {/clutch}
[23/07/2023, 19:48:56] INFO [Method] Mapped {/clutch/savage, GET} route
[23/07/2023, 19:48:56] INFO [Method] Mapped {/clutch/not-a-savage, GET} route
[23/07/2023, 19:48:56] WARNING You must pass the application as an import string to enable 'reload' or 'workers'.

Although this is more of a uvicorn-related problem, I hope to find a work around for this

@struckchure struckchure added enhancement New feature or request help wanted Extra attention is needed labels Jul 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant