mirror of
https://github.com/hibiken/asynq.git
synced 2024-12-25 07:12:17 +08:00
Minor improvement
This commit is contained in:
parent
a96719413c
commit
ef562e2efa
@ -272,13 +272,13 @@ func (r *RDB) EnqueueScheduledTask(id uuid.UUID, score int64) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// EnqueueAllScheduledTasks enqueues all tasks from scheduled queue.
|
// EnqueueAllScheduledTasks enqueues all tasks from scheduled queue
|
||||||
// and returns the number of tasks enqueued.
|
// and returns the number of tasks enqueued.
|
||||||
func (r *RDB) EnqueueAllScheduledTasks() (int64, error) {
|
func (r *RDB) EnqueueAllScheduledTasks() (int64, error) {
|
||||||
return r.removeAndEnqueueAll(scheduledQ)
|
return r.removeAndEnqueueAll(scheduledQ)
|
||||||
}
|
}
|
||||||
|
|
||||||
// EnqueueAllRetryTasks enqueues all tasks from retry queue.
|
// EnqueueAllRetryTasks enqueues all tasks from retry queue
|
||||||
// and returns the number of tasks enqueued.
|
// and returns the number of tasks enqueued.
|
||||||
func (r *RDB) EnqueueAllRetryTasks() (int64, error) {
|
func (r *RDB) EnqueueAllRetryTasks() (int64, error) {
|
||||||
return r.removeAndEnqueueAll(retryQ)
|
return r.removeAndEnqueueAll(retryQ)
|
||||||
|
@ -58,7 +58,7 @@ func enqall(cmd *cobra.Command, args []string) {
|
|||||||
case "dead":
|
case "dead":
|
||||||
n, err = r.EnqueueAllDeadTasks()
|
n, err = r.EnqueueAllDeadTasks()
|
||||||
default:
|
default:
|
||||||
fmt.Printf("error: `asynqmon enqall <queue>` only accepts %v as the argument.\n", enqallValidArgs)
|
fmt.Printf("error: `asynqmon enqall [queue name]` only accepts %v as the argument.\n", enqallValidArgs)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -65,7 +65,7 @@ func ls(cmd *cobra.Command, args []string) {
|
|||||||
case "dead":
|
case "dead":
|
||||||
listDead(r)
|
listDead(r)
|
||||||
default:
|
default:
|
||||||
fmt.Printf("error: `asynqmon ls <queue>` only accepts %v as the argument.\n", lsValidArgs)
|
fmt.Printf("error: `asynqmon ls [queue name]` only accepts %v as the argument.\n", lsValidArgs)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user