mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-18 07:15:20 +00:00
Fix Code Format Warmings
This commit is contained in:
parent
8a423c0a98
commit
5fdb68bd27
1 changed files with 13 additions and 11 deletions
|
|
@ -578,13 +578,15 @@ async def lifespan(app: FastAPI):
|
||||||
|
|
||||||
yield
|
yield
|
||||||
|
|
||||||
# In the lifespan shutdown
|
# In the lifespan shutdown
|
||||||
if hasattr(app.state, "redis_task_command_listener"):
|
if hasattr(app.state, "redis_task_command_listener"):
|
||||||
try:
|
try:
|
||||||
app.state.redis_task_command_listener.cancel()
|
app.state.redis_task_command_listener.cancel()
|
||||||
await app.state.redis_task_command_listener
|
await app.state.redis_task_command_listener
|
||||||
except ExceptionGroup as eg:
|
except ExceptionGroup as eg:
|
||||||
log.error(f"Multiple errors during listener shutdown: {len(eg.exceptions)} exceptions")
|
log.error(
|
||||||
|
f"Multiple errors during listener shutdown: {len(eg.exceptions)} exceptions"
|
||||||
|
)
|
||||||
for exc in eg.exceptions:
|
for exc in eg.exceptions:
|
||||||
log.error(f"Shutdown error: {type(exc).__name__}: {exc}")
|
log.error(f"Shutdown error: {type(exc).__name__}: {exc}")
|
||||||
except asyncio.CancelledError:
|
except asyncio.CancelledError:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue