[PR #432] [MERGED] Add Task Aggregation feature #744

Closed
opened 2026-03-02 06:05:25 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hibiken/asynq/pull/432
Author: @hibiken
Created: 4/10/2022
Status: Merged
Merged: 4/11/2022
Merged by: @hibiken

Base: masterHead: feat/group


📝 Commits (10+)

  • 91a6221 Add group related configuration options
  • 976f76f Add Group task option
  • 19f127b Add helper functions to generate group key
  • 278b2d7 Add RDB.AddToGroup and RDB.AddToGroupUnique methods
  • a88f649 Update Client to add task to group if Group option is specified
  • 17e9725 Update RDB.ForwardIfReady to forward to group if groupKey is specified
  • 47acff3 Add GroupKey field to TaskMessage
  • 1922964 Update client to store groupKey under TaskMessage
  • 39cf648 Update ForwardIfReady test with group
  • 15619fc Update forwarder to use time.Timer

📊 Changes

40 files changed (+4847 additions, -486 deletions)

View changed files

📝 CHANGELOG.md (+11 -0)
aggregator.go (+176 -0)
aggregator_test.go (+165 -0)
📝 asynq.go (+16 -0)
📝 asynq_test.go (+1 -1)
📝 benchmark_test.go (+1 -1)
📝 client.go (+58 -25)
📝 client_test.go (+158 -1)
📝 context.go (+2 -2)
📝 forwarder.go (+3 -1)
📝 forwarder_test.go (+1 -1)
📝 heartbeat_test.go (+1 -1)
📝 inspector.go (+183 -93)
📝 inspector_test.go (+201 -1)
📝 internal/base/base.go (+57 -1)
📝 internal/base/base_test.go (+103 -0)
📝 internal/proto/asynq.pb.go (+91 -78)
📝 internal/proto/asynq.proto (+5 -0)
📝 internal/rdb/benchmark_test.go (+38 -38)
📝 internal/rdb/inspect.go (+344 -43)

...and 20 more files

📄 Description

Closes #339


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hibiken/asynq/pull/432 **Author:** [@hibiken](https://github.com/hibiken) **Created:** 4/10/2022 **Status:** ✅ Merged **Merged:** 4/11/2022 **Merged by:** [@hibiken](https://github.com/hibiken) **Base:** `master` ← **Head:** `feat/group` --- ### 📝 Commits (10+) - [`91a6221`](https://github.com/hibiken/asynq/commit/91a62214d63e38c7da6f54f9bfd7c70aa6eadf71) Add group related configuration options - [`976f76f`](https://github.com/hibiken/asynq/commit/976f76fe5e8001ebd9e6842a962edf7c08f8f05d) Add Group task option - [`19f127b`](https://github.com/hibiken/asynq/commit/19f127b30eb8c75ce072208639a171cb46547111) Add helper functions to generate group key - [`278b2d7`](https://github.com/hibiken/asynq/commit/278b2d74311e0e68a7b90d936d0b0aa7a133f098) Add RDB.AddToGroup and RDB.AddToGroupUnique methods - [`a88f649`](https://github.com/hibiken/asynq/commit/a88f6498af4a3521415c34375cadd4fc78ac7a49) Update Client to add task to group if Group option is specified - [`17e9725`](https://github.com/hibiken/asynq/commit/17e97252873e4bcd2afd553997c98815d6893737) Update RDB.ForwardIfReady to forward to group if groupKey is specified - [`47acff3`](https://github.com/hibiken/asynq/commit/47acff368403aaf88881e72cfcf8fc2cb0bfbd25) Add GroupKey field to TaskMessage - [`1922964`](https://github.com/hibiken/asynq/commit/19229645ff163847c5f466e8f36a3af17bd0be31) Update client to store groupKey under TaskMessage - [`39cf648`](https://github.com/hibiken/asynq/commit/39cf648c02628faf0de4f9825b150f20cb29cc8b) Update ForwardIfReady test with group - [`15619fc`](https://github.com/hibiken/asynq/commit/15619fc89001f8c95c8426052e4f2a483cbfcab8) Update forwarder to use time.Timer ### 📊 Changes **40 files changed** (+4847 additions, -486 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+11 -0) ➕ `aggregator.go` (+176 -0) ➕ `aggregator_test.go` (+165 -0) 📝 `asynq.go` (+16 -0) 📝 `asynq_test.go` (+1 -1) 📝 `benchmark_test.go` (+1 -1) 📝 `client.go` (+58 -25) 📝 `client_test.go` (+158 -1) 📝 `context.go` (+2 -2) 📝 `forwarder.go` (+3 -1) 📝 `forwarder_test.go` (+1 -1) 📝 `heartbeat_test.go` (+1 -1) 📝 `inspector.go` (+183 -93) 📝 `inspector_test.go` (+201 -1) 📝 `internal/base/base.go` (+57 -1) 📝 `internal/base/base_test.go` (+103 -0) 📝 `internal/proto/asynq.pb.go` (+91 -78) 📝 `internal/proto/asynq.proto` (+5 -0) 📝 `internal/rdb/benchmark_test.go` (+38 -38) 📝 `internal/rdb/inspect.go` (+344 -43) _...and 20 more files_ </details> ### 📄 Description Closes #339 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 06:05:25 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynq#744
No description provided.