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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user