Auto-update: Fri Aug 2 00:50:57 PDT 2024

This commit is contained in:
sanj 2024-08-02 00:50:57 -07:00
parent 0ddc70164e
commit c5c426913e

View file

@ -63,7 +63,7 @@ async def lifespan(app: FastAPI):
try: try:
yield # This is where the app runs yield # This is where the app runs
finally: finally:
# Shutdown # Shutdown
crit("Shutting down...") crit("Shutting down...")
@ -184,7 +184,8 @@ def load_router(router_name):
def main(argv): def main(argv):
config = HypercornConfig() config = HypercornConfig()
config.bind = [API.BIND] config.bind = [API.BIND]
config.startup_timeout = 3600 # 1 hour config.startup_timeout = 300 # 5 minutes
config.shutdown_timeout = 15 # 15 seconds
asyncio.run(serve(app, config)) asyncio.run(serve(app, config))
if __name__ == "__main__": if __name__ == "__main__":