Skip to content
Discussion options

You must be logged in to vote

I'm curious why did you choose such a design path. No offence here but looking at a code, it is just not good. You try to start on startup event, from what I understand, completely independent service that is bind to some port.

Please assume you start your uvicorn server or any other in many processes (using workers param), you will get errors, probably "address already in use" or similar. Another situation: you do have many containers, vms etc. with your fastapi instance. For each one you start process with scheduler. Is that desired? Startup/Shutdown may be although a good place to set up/initialize connection as you do it, but - for me - not for starting, you name it, another service t…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by YuriiMotov
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or problem question-migrate
2 participants
Converted from issue

This discussion was converted from issue #4363 on February 27, 2023 22:15.