feat: 添加过载保护、背压和熔断机制
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / build (push) Has been cancelled
CI / security-scan (push) Has been cancelled

This commit is contained in:
freedakgmail
2026-08-03 08:12:28 +08:00
parent 5bcfbdb88d
commit e7e98271d4
8 changed files with 704 additions and 36 deletions
+1 -1
View File
@@ -157,7 +157,7 @@ func (s *Store) RecoverPendingTasks() (int, error) {
defer s.mu.Unlock()
result, err := s.db.Exec(
`UPDATE tasks SET state = 'FAILED', error_message = 'gateway restart' WHERE state IN ('RUNNING', 'STREAMING')`)
`UPDATE tasks SET state = 'FAILED', error_message = 'gateway restart' WHERE state IN ('RUNNING', 'STREAMING', 'QUEUED')`)
if err != nil {
return 0, err
}