aboutsummaryrefslogtreecommitdiffstats
path: root/modules/queue/queue_disk_channel.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-05-02 08:22:30 +0100
committerGitHub <noreply@github.com>2021-05-02 08:22:30 +0100
commit0590176a23c056b274bd30ff7cec8f8a203f0665 (patch)
tree5dba7449c52a0ec32d03e8f07661e4619bd2ef49 /modules/queue/queue_disk_channel.go
parent6ebd833780c97da7b065ad9d3b49d70d7dcdbbd4 (diff)
downloadgitea-0590176a23c056b274bd30ff7cec8f8a203f0665.tar.gz
gitea-0590176a23c056b274bd30ff7cec8f8a203f0665.zip
Only use boost workers for leveldb shadow queues (#15696)
* The leveldb shadow queue of a persistable channel queue should always start with 0 workers and just use boost to add additional workers if necessary. * create a zero boost so that if there are no workers in a pool - boost to start the workers * actually set timeout appropriately on boosted workers Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/queue/queue_disk_channel.go')
-rw-r--r--modules/queue/queue_disk_channel.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/queue/queue_disk_channel.go b/modules/queue/queue_disk_channel.go
index 433435c301..801fd8a122 100644
--- a/modules/queue/queue_disk_channel.go
+++ b/modules/queue/queue_disk_channel.go
@@ -75,10 +75,10 @@ func NewPersistableChannelQueue(handle HandlerFunc, cfg, exemplar interface{}) (
BatchLength: config.BatchLength,
BlockTimeout: 1 * time.Second,
BoostTimeout: 5 * time.Minute,
- BoostWorkers: 5,
- MaxWorkers: 6,
+ BoostWorkers: 1,
+ MaxWorkers: 5,
},
- Workers: 1,
+ Workers: 0,
Name: config.Name + "-level",
},
DataDir: config.DataDir,