2
0
mirror of https://github.com/hibiken/asynq.git synced 2025-10-05 18:02:01 +08:00

Add EnqueueContext method to Client

This commit is contained in:
Ken Hibino
2021-11-15 16:34:26 -08:00
committed by GitHub
parent e2b61c9056
commit 9f2c321e98
9 changed files with 131 additions and 82 deletions

View File

@@ -879,7 +879,7 @@ func TestListScheduledPagination(t *testing.T) {
// create 100 tasks with an increasing number of wait time.
for i := 0; i < 100; i++ {
msg := h.NewTaskMessage(fmt.Sprintf("task %d", i), nil)
if err := r.Schedule(msg, time.Now().Add(time.Duration(i)*time.Second)); err != nil {
if err := r.Schedule(context.Background(), msg, time.Now().Add(time.Duration(i)*time.Second)); err != nil {
t.Fatal(err)
}
}