diff options
| author | 2025-07-15 18:16:12 +0700 | |
|---|---|---|
| committer | 2025-07-15 18:21:31 +0700 | |
| commit | 2f03ac5ac3a68ad26efc67f78b16dddf8c53b843 (patch) | |
| tree | cdd88fe4ad9c3aa210044daf41dc21a00fa87232 /config | |
| parent | 2d2138383af6d28c5b947c5a6c4989afa8f7ac56 (diff) | |
| download | thumbnail-generator-2f03ac5ac3a68ad26efc67f78b16dddf8c53b843.tar.gz thumbnail-generator-2f03ac5ac3a68ad26efc67f78b16dddf8c53b843.zip | |
feat: implement concurrency
Diffstat (limited to 'config')
| -rw-r--r-- | config/config.go | 8 | ||||
| -rw-r--r-- | config/config.json | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/config/config.go b/config/config.go index 5df29df..0b6c4ff 100644 --- a/config/config.go +++ b/config/config.go @@ -9,9 +9,11 @@ import ( ) type Config struct { - Input InputConfig `json:"Input" validate:"required"` - Processor ProcessorConfig `json:"Processor" validate:"required"` - Output OutputConfig `json:"Output" validate:"required"` + Input InputConfig `json:"Input" validate:"required"` + Processor ProcessorConfig `json:"Processor" validate:"required"` + Output OutputConfig `json:"Output" validate:"required"` + MaxConcurrentJobs int `json:"MaxConcurrentJobs" validate:"required,min=1"` + ForceRewrite bool `json:"ForceRewrite" validate:"required"` } type InputConfig struct { diff --git a/config/config.json b/config/config.json index 01b7727..742949f 100644 --- a/config/config.json +++ b/config/config.json @@ -1,4 +1,6 @@ { + "ForceRewrite": false, + "MaxConcurrentJobs": 4, "Input": { "Storage": { "Type": "b2", |