mirror of
https://github.com/hibiken/asynq.git
synced 2024-12-27 16:13:40 +08:00
Minor fix
This commit is contained in:
parent
8e23b865e9
commit
4b81b91d3e
@ -56,8 +56,7 @@ func (r *RDB) Enqueue(msg *base.TaskMessage) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
err := r.client.SAdd(base.AllQueues, msg.Queue).Err()
|
if err := r.client.SAdd(base.AllQueues, msg.Queue).Err(); err != nil {
|
||||||
if err != nil {
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
key := base.QueueKey(msg.Queue)
|
key := base.QueueKey(msg.Queue)
|
||||||
@ -85,8 +84,7 @@ func (r *RDB) EnqueueUnique(msg *base.TaskMessage, ttl time.Duration) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
err := r.client.SAdd(base.AllQueues, msg.Queue).Err()
|
if err := r.client.SAdd(base.AllQueues, msg.Queue).Err(); err != nil {
|
||||||
if err != nil {
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
res, err := enqueueUniqueCmd.Run(r.client,
|
res, err := enqueueUniqueCmd.Run(r.client,
|
||||||
@ -258,8 +256,7 @@ func (r *RDB) Schedule(msg *base.TaskMessage, processAt time.Time) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
err := r.client.SAdd(base.AllQueues, msg.Queue).Err()
|
if err := r.client.SAdd(base.AllQueues, msg.Queue).Err(); err != nil {
|
||||||
if err != nil {
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
score := float64(processAt.Unix())
|
score := float64(processAt.Unix())
|
||||||
@ -288,8 +285,7 @@ func (r *RDB) ScheduleUnique(msg *base.TaskMessage, processAt time.Time, ttl tim
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
err := r.client.SAdd(base.AllQueues, msg.Queue).Err()
|
if err := r.client.SAdd(base.AllQueues, msg.Queue).Err(); err != nil {
|
||||||
if err != nil {
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
score := float64(processAt.Unix())
|
score := float64(processAt.Unix())
|
||||||
|
Loading…
Reference in New Issue
Block a user