fix: cancel abandoned generation tasks
- Propagate stream closure and stop-sequence termination into scheduler cancellation - Defer active KV release to the scheduler owner and close metrics safely - Expose lifecycle counters and cover waiting, active, and allocation-race cleanup
This commit is contained in:
Vendored
+5
@@ -322,6 +322,11 @@ class TaskCacheManager:
|
||||
state.length = pos + 1
|
||||
return True
|
||||
|
||||
@property
|
||||
def task_count(self) -> int:
|
||||
"""Number of tasks currently holding KV request state."""
|
||||
return len(self._states)
|
||||
|
||||
def task_cached(self, task_id: str) -> int:
|
||||
state = self._states.get(task_id)
|
||||
return state.cached if state is not None else 0
|
||||
|
||||
Reference in New Issue
Block a user