feat: enforce durable queue resource limits and backpressure

This commit is contained in:
2026-09-17 17:25:56 +08:00
parent 3ce7d2c104
commit 5c8825e4bc
38 changed files with 1231 additions and 30 deletions

View File

@@ -101,6 +101,11 @@ func (s *TaskStore) CancelTask(ctx context.Context, token auth.Token, id core.ID
if err := exactlyOne(result, err); err != nil {
return err
}
if next.Terminal() {
if err := releaseQueueTask(ctx, tx, token.NamespaceID, view.QueueID); err != nil {
return err
}
}
out.Task, err = readTask(ctx, tx, token.NamespaceID, id, false)
if err != nil {
return err