mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-08-01 02:11:15 -04:00
Rename max concurrency option
This commit is contained in:
@@ -28,7 +28,7 @@ type Config struct {
|
||||
Extractor Extractor `yaml:"extractor"`
|
||||
ContentExtractionSizeLimit uint64 `yaml:"content_extraction_size_limit" env:"SEARCH_CONTENT_EXTRACTION_SIZE_LIMIT" desc:"Maximum file size in bytes that is allowed for content extraction." introductionVersion:"1.0.0"`
|
||||
BatchSize int `yaml:"batch_size" env:"SEARCH_BATCH_SIZE" desc:"The number of documents to process in a single batch. Defaults to 500." introductionVersion:"1.0.0"`
|
||||
ReindexConcurrency int `yaml:"reindex_concurrency" env:"SEARCH_REINDEX_CONCURRENCY" desc:"The maximum number of spaces that are reindexed concurrently when reindexing all spaces." introductionVersion:"%%NEXT%%"`
|
||||
ReindexMaxConcurrency int `yaml:"reindex_concurrency" env:"SEARCH_REINDEX_MAX_CONCURRENCY" desc:"The maximum number of spaces that are reindexed concurrently when reindexing all spaces." introductionVersion:"%%NEXT%%"`
|
||||
|
||||
ServiceAccount ServiceAccount `yaml:"service_account"`
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ func DefaultConfig() *config.Config {
|
||||
},
|
||||
ContentExtractionSizeLimit: 20 * 1024 * 1024, // Limit content extraction to <20MB files by default
|
||||
BatchSize: 50,
|
||||
ReindexConcurrency: 3,
|
||||
ReindexMaxConcurrency: 3,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ func (s Service) IndexSpace(_ context.Context, in *searchsvc.IndexSpaceRequest,
|
||||
|
||||
// Index all spaces concurrently, limited to a configurable number of spaces
|
||||
// being reindexed at the same time.
|
||||
concurrency := max(s.cfg.ReindexConcurrency, 1)
|
||||
concurrency := max(s.cfg.ReindexMaxConcurrency, 1)
|
||||
var g errgroup.Group
|
||||
g.SetLimit(concurrency)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user