[PR #849] [CLOSED] Feature: control queue concurrency #898

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

📋 Pull Request Information

Original PR: https://github.com/hibiken/asynq/pull/849
Author: @kanzihuang
Created: 3/20/2024
Status: Closed

Base: masterHead: feat/queue-concurrency-control


📝 Commits (5)

  • 7c61576 fix: run all tests on windows
  • d74ce1e feat: queue concurrency control
  • f4b0a90 feat: stop active tasks when server shutdown
  • d02ae4d fix: mismatch score found at TestClientEnqueueWithGroupOption
  • 8f93c46 test: improve testing coverage

📊 Changes

13 files changed (+507 additions, -70 deletions)

View changed files

📝 client_test.go (+2 -2)
📝 example_test.go (+2 -0)
📝 go.mod (+5 -1)
📝 go.sum (+9 -3)
📝 internal/rdb/rdb.go (+37 -13)
📝 internal/rdb/rdb_test.go (+81 -0)
internal/timeutil/sleep.go (+19 -0)
internal/timeutil/sleep_test.go (+47 -0)
📝 processor.go (+25 -17)
📝 scheduler_test.go (+68 -0)
📝 server.go (+7 -2)
📝 server_test.go (+202 -28)
📝 signals_windows.go (+3 -4)

📄 Description

// Config specifies the server's background-task processing behavior.
type Config struct {
// Maximum number of concurrent tasks of a queue.
//
// If set to a zero or not set, NewServer will not limit concurrency of the queue.
QueueConcurrency map[string]int
}


🔄 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/849 **Author:** [@kanzihuang](https://github.com/kanzihuang) **Created:** 3/20/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `feat/queue-concurrency-control` --- ### 📝 Commits (5) - [`7c61576`](https://github.com/hibiken/asynq/commit/7c61576503d694a32ccc33125e26e1c6251e1660) fix: run all tests on windows - [`d74ce1e`](https://github.com/hibiken/asynq/commit/d74ce1ee92467c9f586b745d4dcf7a69f8a49ba8) feat: queue concurrency control - [`f4b0a90`](https://github.com/hibiken/asynq/commit/f4b0a9032a987ed7d7691ad0964c7bcf1a2eec1b) feat: stop active tasks when server shutdown - [`d02ae4d`](https://github.com/hibiken/asynq/commit/d02ae4d6020903e314a132093d4d6e1427615379) fix: mismatch score found at TestClientEnqueueWithGroupOption - [`8f93c46`](https://github.com/hibiken/asynq/commit/8f93c46c6258fe0d7c62e6eba168d559bc2c1280) test: improve testing coverage ### 📊 Changes **13 files changed** (+507 additions, -70 deletions) <details> <summary>View changed files</summary> 📝 `client_test.go` (+2 -2) 📝 `example_test.go` (+2 -0) 📝 `go.mod` (+5 -1) 📝 `go.sum` (+9 -3) 📝 `internal/rdb/rdb.go` (+37 -13) 📝 `internal/rdb/rdb_test.go` (+81 -0) ➕ `internal/timeutil/sleep.go` (+19 -0) ➕ `internal/timeutil/sleep_test.go` (+47 -0) 📝 `processor.go` (+25 -17) 📝 `scheduler_test.go` (+68 -0) 📝 `server.go` (+7 -2) 📝 `server_test.go` (+202 -28) 📝 `signals_windows.go` (+3 -4) </details> ### 📄 Description // Config specifies the server's background-task processing behavior. type Config struct { // Maximum number of concurrent tasks of a queue. // // If set to a zero or not set, NewServer will not limit concurrency of the queue. QueueConcurrency map[string]int } --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 06:10:20 +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#898
No description provided.