mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 12:26:35 +00:00
Iterating on cance;ation logic
This commit is contained in:
@@ -119,3 +119,14 @@ func (q *persistentQueue) Evict(c context.Context, id string) error {
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// Evict removes a pending task from the queue.
|
||||
func (q *persistentQueue) EvictAtOnce(c context.Context, ids []string) error {
|
||||
err := q.Queue.EvictAtOnce(c, ids)
|
||||
if err == nil {
|
||||
for _, id := range ids {
|
||||
q.store.TaskDelete(id)
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user