Add CancelActiveTask method to Inspector

This commit is contained in:
Ken Hibino
2020-12-05 06:49:01 -08:00
parent 52d536a8f5
commit c06e9de97d
2 changed files with 9 additions and 0 deletions

View File

@@ -598,6 +598,14 @@ func (i *Inspector) KillTaskByKey(qname, key string) error {
}
}
// CancelActiveTask sends a signal to cancel processing of the task with
// the given id. CancelActiveTask is best-effort, which means that it does not
// guarantee that the task with the given id will be canceled. The return
// value only indicates whether the cancelation signal has been sent.
func (i *Inspector) CancelActiveTask(id string) error {
return i.rdb.PublishCancelation(id)
}
// PauseQueue pauses task processing on the specified queue.
// If the queue is already paused, it will return a non-nil error.
func (i *Inspector) PauseQueue(qname string) error {