Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Commit

Permalink
fix: Produce SessionCancelledEvent for pending-timeout sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Mar 30, 2022
1 parent 6edf9ba commit 70b78f5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ai/backend/manager/scheduler/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,14 @@ async def _apply_cancellation():
await db_conn.execute(query)

await execute_with_retry(_apply_cancellation)
for item in cancelled_session_rows:
await self.event_producer.produce_event(
SessionCancelledEvent(
item['session_id'],
item['session_creation_id'],
reason="pending timeout",
),
)

log.debug(
"running scheduler (sgroup:{}, pending:{}, existing:{}, cancelled:{})",
Expand Down

0 comments on commit 70b78f5

Please sign in to comment.