Change github app startup logic to support gunicorj

This commit is contained in:
Ori Kotek
2024-02-23 18:27:34 +02:00
parent 6df2a6769e
commit 90599f53d4

View File

@ -280,7 +280,6 @@ async def root():
return {"status": "ok"}
def start():
if get_settings().github_app.override_deployment_type:
# Override the deployment type to app
get_settings().set("GITHUB.DEPLOYMENT_TYPE", "app")
@ -289,8 +288,7 @@ def start():
app = FastAPI(middleware=middleware)
app.include_router(router)
def start():
uvicorn.run(app, host="0.0.0.0", port=int(os.environ.get("PORT", "3000")))
if __name__ == '__main__':
start()