aboutsummaryrefslogtreecommitdiffstats
path: root/modules/queue/unique_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/unique_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/unique_queue_disk_channel.go')
-rw-r--r--modules/queue/unique_queue_disk_channel.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/queue/unique_queue_disk_channel.go b/modules/queue/unique_queue_disk_channel.go
index 4a69b43eae..47c4f2bdd5 100644
--- a/modules/queue/unique_queue_disk_channel.go
+++ b/modules/queue/unique_queue_disk_channel.go
@@ -73,12 +73,12 @@ func NewPersistableChannelUniqueQueue(handle HandlerFunc, cfg, exemplar interfac
WorkerPoolConfiguration: WorkerPoolConfiguration{
QueueLength: config.QueueLength,
BatchLength: config.BatchLength,
- BlockTimeout: 0,
- BoostTimeout: 0,
- BoostWorkers: 0,
- MaxWorkers: 1,
+ BlockTimeout: 1 * time.Second,
+ BoostTimeout: 5 * time.Minute,
+ BoostWorkers: 1,
+ MaxWorkers: 5,
},
- Workers: 1,
+ Workers: 0,
Name: config.Name + "-level",
},
DataDir: config.DataDir,