summaryrefslogtreecommitdiff
path: root/config/config.go
diff options
from:
to:
context:
space:
mode:
authorGravatar SayaAndy <montferrat@tuta.io> 2025-08-15 00:51:07 +0700
committerGravatar SayaAndy <montferrat@tuta.io> 2025-08-15 00:51:07 +0700
commitc9b2f8ca2239d64eaede7a0d755f038fe506bcca (patch)
treec4249bc7b91967af9c1e0323aa5f347cb46a381e /config/config.go
parentce7afeb5cb433a55fe2c30ab71cbeeb07c14b830 (diff)
downloadthumbnail-generator-c9b2f8ca2239d64eaede7a0d755f038fe506bcca.tar.gz
thumbnail-generator-c9b2f8ca2239d64eaede7a0d755f038fe506bcca.zip
refactor: split semaphore into pre-process & process
Diffstat (limited to 'config/config.go')
-rw-r--r--config/config.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/config/config.go b/config/config.go
index d2b7072..5b05ce9 100644
--- a/config/config.go
+++ b/config/config.go
@@ -10,12 +10,13 @@ import (
)
type Config struct {
- Input InputConfig `json:"Input" validate:"required"`
- Converter ConverterConfig `json:"Converter" validate:"required"`
- Output OutputConfig `json:"Output" validate:"required"`
- MaxConcurrentJobs int `json:"MaxConcurrentJobs" validate:"required,min=1"`
- ForceRewrite bool `json:"ForceRewrite" validate:"required"`
- LogLevel slog.Level `json:"LogLevel" validate:"required"`
+ Input InputConfig `json:"Input" validate:"required"`
+ Converter ConverterConfig `json:"Converter" validate:"required"`
+ Output OutputConfig `json:"Output" validate:"required"`
+ MaxProcessThreads int `json:"MaxProcessThreads" validate:"required,min=1"`
+ MaxPreProcessThreads int `json:"MaxPreProcessThreads" validate:"min=1;gtefield=MaxProcessThreads"`
+ ForceRewrite bool `json:"ForceRewrite" validate:"required"`
+ LogLevel slog.Level `json:"LogLevel" validate:"required"`
}
type InputConfig struct {