2021-01-29 08:40:42 +08:00
|
|
|
// Copyright 2020 Kentaro Hibino. All rights reserved.
|
|
|
|
// Use of this source code is governed by a MIT license
|
|
|
|
// that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
/*
|
|
|
|
Package inspeq provides helper types and functions to inspect queues and tasks managed by Asynq.
|
|
|
|
|
2021-01-29 11:37:17 +08:00
|
|
|
Inspector is used to query and mutate the state of queues and tasks.
|
2021-01-29 08:40:42 +08:00
|
|
|
|
2021-01-29 11:37:17 +08:00
|
|
|
Example:
|
2021-01-29 08:40:42 +08:00
|
|
|
|
2021-01-29 11:37:17 +08:00
|
|
|
inspector := inspeq.New(asynq.RedisClientOpt{Addr: "localhost:6379"})
|
2021-01-29 08:40:42 +08:00
|
|
|
|
2021-01-29 11:37:17 +08:00
|
|
|
tasks, err := inspector.ListArchivedTasks("my-queue")
|
|
|
|
|
|
|
|
for _, t := range tasks {
|
|
|
|
if err := inspector.DeleteTaskByKey(t.Key()); err != nil {
|
2021-01-29 08:40:42 +08:00
|
|
|
// handle error
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
package inspeq
|