-
|
Get the port of the service in FastAPI. I expect FastAPI to get its own port, and then periodically update the IP and port of the machine to the database to prevent the service of one machine from being suspended |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
Please re-ask the question in English. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the help @ycd! 🍰 @xujiang1 that would then be outside of FastAPI, if you are running the Uvicorn command from outside, you would have to stop it and start it again with the new host and port. If you run Uvicorn from inside Python, you would also have to, in some way, stop the process and restart it with the new host and port. But in both cases it would really be outside of FastAPI.
|
Beta Was this translation helpful? Give feedback.
-
|
Assuming the original need was handled, this will be automatically closed now. But feel free to add more comments or create new issues or PRs. |
Beta Was this translation helpful? Give feedback.
Thanks for the help @ycd! 🍰
@xujiang1 that would then be outside of FastAPI, if you are running the Uvicorn command from outside, you would have to stop it and start it again with the new host and port. If you run Uvicorn from inside Python, you would also have to, in some way, stop the process and restart it with the new host and port. But in both cases it would really be outside of FastAPI.