()
| 25 | |
| 26 | |
| 27 | async def run_server(): |
| 28 | # Start the token cost update task |
| 29 | update_tokencosts_task = asyncio.create_task(update_tokencosts_periodically()) |
| 30 | |
| 31 | # Configure uvicorn server |
| 32 | config = uvicorn.Config(app=app, host="0.0.0.0", port=8000, reload=True, log_level="info") |
| 33 | |
| 34 | # Create and start the server |
| 35 | server = uvicorn.Server(config) |
| 36 | await server.serve() |
| 37 | |
| 38 | # Wait for the token cost update task |
| 39 | await update_tokencosts_task |
| 40 | |
| 41 | |
| 42 | if __name__ == "__main__": |
no test coverage detected
searching dependent graphs…