2
0
mirror of https://github.com/hibiken/asynq.git synced 2026-02-01 06:44:22 +00:00

Support delete and archive actions on PendingTask

* Add `DeleteAllPendingTasks`, `ArchiveAllPendingTasks` to `Inspector`

* `DeleteTaskByKey` and `ArchiveTaskByKey` now supports deleting/archiving PendingTask

* Updated `asynq task` command with support for deleting/archiving pending tasks
This commit is contained in:
Ken Hibino
2021-01-20 15:03:34 -08:00
parent 557c1a5044
commit c9a6ab8ae1
8 changed files with 752 additions and 59 deletions

View File

@@ -3017,7 +3017,7 @@ func TestWriteListClearSchedulerEntries(t *testing.T) {
schedulerID := "127.0.0.1:9876:abc123"
data := []*base.SchedulerEntry{
&base.SchedulerEntry{
{
Spec: "* * * * *",
Type: "foo",
Payload: nil,
@@ -3025,7 +3025,7 @@ func TestWriteListClearSchedulerEntries(t *testing.T) {
Next: now.Add(5 * time.Hour),
Prev: now.Add(-2 * time.Hour),
},
&base.SchedulerEntry{
{
Spec: "@every 20m",
Type: "bar",
Payload: map[string]interface{}{"fiz": "baz"},