[PR #1094] Add BatchEnqueue for pipelined multi-task enqueue #2023

Open
opened 2026-03-07 22:14:19 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hibiken/asynq/pull/1094
Author: @enilsen16
Created: 2/24/2026
Status: 🔄 Open

Base: masterHead: batch-enqueue


📝 Commits (4)

  • f919a60 Add BatchEnqueue for pipelined multi-task enqueue
  • 4e62d7e Add tests for BatchEnqueue: multiple tasks, empty batch, duplicate IDs
  • 71ebcfa Fix BatchEnqueueContext time comparison and add scheduled task support
  • 7ae0b3f Add Options() accessor on Task for external option merging

📊 Changes

7 files changed (+455 additions, -0 deletions)

View changed files

📝 asynq.go (+1 -0)
📝 client.go (+107 -0)
📝 client_test.go (+124 -0)
📝 internal/base/base.go (+9 -0)
📝 internal/rdb/rdb.go (+70 -0)
📝 internal/rdb/rdb_test.go (+135 -0)
📝 internal/testbroker/testbroker.go (+9 -0)

📄 Description

Adds BatchEnqueue to the Broker interface and RDB implementation that sends multiple enqueueCmd Lua script invocations in a single Redis pipeline round-trip. Also adds BatchEnqueueContext to the Client as the public API, returning per-task results for partial-success handling.

Ref: hibiken/asynq#1069


🔄 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/1094 **Author:** [@enilsen16](https://github.com/enilsen16) **Created:** 2/24/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `batch-enqueue` --- ### 📝 Commits (4) - [`f919a60`](https://github.com/hibiken/asynq/commit/f919a605d57b4168c206216df717db098ba40e37) Add BatchEnqueue for pipelined multi-task enqueue - [`4e62d7e`](https://github.com/hibiken/asynq/commit/4e62d7e29d2d917217471258d4430ee130219184) Add tests for BatchEnqueue: multiple tasks, empty batch, duplicate IDs - [`71ebcfa`](https://github.com/hibiken/asynq/commit/71ebcfa129854909f2dbce2619d57f9264d99a11) Fix BatchEnqueueContext time comparison and add scheduled task support - [`7ae0b3f`](https://github.com/hibiken/asynq/commit/7ae0b3fe221e491c34398760aa1a0b27c3f08682) Add Options() accessor on Task for external option merging ### 📊 Changes **7 files changed** (+455 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `asynq.go` (+1 -0) 📝 `client.go` (+107 -0) 📝 `client_test.go` (+124 -0) 📝 `internal/base/base.go` (+9 -0) 📝 `internal/rdb/rdb.go` (+70 -0) 📝 `internal/rdb/rdb_test.go` (+135 -0) 📝 `internal/testbroker/testbroker.go` (+9 -0) </details> ### 📄 Description Adds BatchEnqueue to the Broker interface and RDB implementation that sends multiple enqueueCmd Lua script invocations in a single Redis pipeline round-trip. Also adds BatchEnqueueContext to the Client as the public API, returning per-task results for partial-success handling. Ref: hibiken/asynq#1069 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#2023
No description provided.