mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-05 05:10:38 +08:00
Merge pull request #701 from Codium-ai/ok/github_app_startup
Change github app startup logic to support gunicorj
This commit is contained in:
@ -280,7 +280,6 @@ async def root():
|
|||||||
return {"status": "ok"}
|
return {"status": "ok"}
|
||||||
|
|
||||||
|
|
||||||
def start():
|
|
||||||
if get_settings().github_app.override_deployment_type:
|
if get_settings().github_app.override_deployment_type:
|
||||||
# Override the deployment type to app
|
# Override the deployment type to app
|
||||||
get_settings().set("GITHUB.DEPLOYMENT_TYPE", "app")
|
get_settings().set("GITHUB.DEPLOYMENT_TYPE", "app")
|
||||||
@ -289,8 +288,9 @@ def start():
|
|||||||
app = FastAPI(middleware=middleware)
|
app = FastAPI(middleware=middleware)
|
||||||
app.include_router(router)
|
app.include_router(router)
|
||||||
|
|
||||||
uvicorn.run(app, host="0.0.0.0", port=int(os.environ.get("PORT", "3000")))
|
|
||||||
|
|
||||||
|
def start():
|
||||||
|
uvicorn.run(app, host="0.0.0.0", port=int(os.environ.get("PORT", "3000")))
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
start()
|
start()
|
||||||
|
Reference in New Issue
Block a user