2
0
mirror of https://github.com/hibiken/asynq.git synced 2026-05-24 19:17:46 +08:00

Feature: Add Headers Support to Tasks (#1070)

* feat(task): Add headers support to tasks

* fix: cleanup copy map code

* fix: Add tests
This commit is contained in:
Joe
2025-11-04 09:07:59 -08:00
committed by GitHub
parent 8261a03f0d
commit 5de9b1faf0
9 changed files with 647 additions and 250 deletions

View File

@@ -156,7 +156,7 @@ func (a *aggregator) aggregate(t time.Time) {
}
tasks := make([]*Task, len(msgs))
for i, m := range msgs {
tasks[i] = NewTask(m.Type, m.Payload)
tasks[i] = NewTaskWithHeaders(m.Type, m.Payload, m.Headers)
}
aggregatedTask := a.ga.Aggregate(gname, tasks)
ctx, cancel := context.WithDeadline(context.Background(), deadline)