2
0
mirror of https://github.com/hibiken/asynq.git synced 2024-12-27 00:02:19 +08:00

Minor fix

This commit is contained in:
Ken Hibino 2020-08-10 06:13:06 -07:00
parent 8e23b865e9
commit 4b81b91d3e

View File

@ -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())