1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-04 17:47:19 +00:00

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>
This commit is contained in:
zeripath
2021-05-02 08:22:30 +01:00
committed by GitHub
parent 6ebd833780
commit 0590176a23
3 changed files with 48 additions and 10 deletions

View File

@ -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,