From 8ff5c5101e0718eaf9dacc99d527d475b9dd4975 Mon Sep 17 00:00:00 2001 From: Ken Hibino Date: Tue, 7 Jan 2020 21:53:38 -0800 Subject: [PATCH] [ci skip] Update changelog --- CHANGELOG.md | 2 ++ background.go | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index feb0a4e..a9722ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - NewTask constructor +- `Queues` option in `Config` to specify mutiple queues with priority level +- `Client` can schedule a task with `asynq.Queue(name)` to specify which queue to use ### Changed diff --git a/background.go b/background.go index 5ec8b52..3cf6122 100644 --- a/background.go +++ b/background.go @@ -61,14 +61,15 @@ type Config struct { // // If set to nil or not specified, the background will process only the "default" queue. // - // Priority is treated as follows to prevent starving low priority queues. + // Priority is treated as follows to avoid starving low priority queues. + // // Example: // Queues: map[string]uint{ // "critical": 6, // "default": 3, // "low": 1, // } - // With the above config and if all queues are not empty, then the tasks + // With the above config and given that all queues are not empty, the tasks // in "critical", "default", "low" should be processed 60%, 30%, 10% of // the time respectively. Queues map[string]uint