mirror of
https://github.com/hibiken/asynq.git
synced 2024-12-26 07:42:17 +08:00
Update client to store groupKey under TaskMessage
This commit is contained in:
parent
401f7fb4fe
commit
4e8885276c
@ -375,6 +375,7 @@ func (c *Client) EnqueueContext(ctx context.Context, task *Task, opts ...Option)
|
|||||||
Deadline: deadline.Unix(),
|
Deadline: deadline.Unix(),
|
||||||
Timeout: int64(timeout.Seconds()),
|
Timeout: int64(timeout.Seconds()),
|
||||||
UniqueKey: uniqueKey,
|
UniqueKey: uniqueKey,
|
||||||
|
GroupKey: opt.groupKey,
|
||||||
Retention: int64(opt.retention.Seconds()),
|
Retention: int64(opt.retention.Seconds()),
|
||||||
}
|
}
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
|
@ -528,6 +528,7 @@ func TestClientEnqueueWithGroupOption(t *testing.T) {
|
|||||||
Queue: "default",
|
Queue: "default",
|
||||||
Timeout: int64(defaultTimeout.Seconds()),
|
Timeout: int64(defaultTimeout.Seconds()),
|
||||||
Deadline: noDeadline.Unix(),
|
Deadline: noDeadline.Unix(),
|
||||||
|
GroupKey: "mygroup",
|
||||||
},
|
},
|
||||||
Score: now.Unix(),
|
Score: now.Unix(),
|
||||||
},
|
},
|
||||||
@ -576,6 +577,7 @@ func TestClientEnqueueWithGroupOption(t *testing.T) {
|
|||||||
Queue: "default",
|
Queue: "default",
|
||||||
Timeout: int64(defaultTimeout.Seconds()),
|
Timeout: int64(defaultTimeout.Seconds()),
|
||||||
Deadline: noDeadline.Unix(),
|
Deadline: noDeadline.Unix(),
|
||||||
|
GroupKey: "mygroup",
|
||||||
},
|
},
|
||||||
Score: now.Add(30 * time.Minute).Unix(),
|
Score: now.Add(30 * time.Minute).Unix(),
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user