forked from mtusi2026/mtusi2026lab6
refactor(api): stop running reconciler inside API
This commit is contained in:
@@ -28,7 +28,7 @@ type Config struct {
|
||||
MaxUploadBytes int64
|
||||
MaxImagePixels int64
|
||||
|
||||
ReconcilerEnabled bool
|
||||
// ReconcilerEnabled bool
|
||||
ReconcilerInterval time.Duration
|
||||
ReconcilerGracePeriod time.Duration
|
||||
|
||||
@@ -111,10 +111,10 @@ func Load() (*Config, error) {
|
||||
return nil, fmt.Errorf("MAX_IMAGE_PIXELS должен быть положительным")
|
||||
}
|
||||
|
||||
reconcilerEnabled, err := readBool("RECONCILER_ENABLED", true)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("RECONCILER_ENABLED: %w", err)
|
||||
}
|
||||
// reconcilerEnabled, err := readBool("RECONCILER_ENABLED", true)
|
||||
// if err != nil {
|
||||
// return nil, fmt.Errorf("RECONCILER_ENABLED: %w", err)
|
||||
// }
|
||||
reconcilerIntervalSec, err := readInt("RECONCILER_INTERVAL_SECONDS", 300)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("RECONCILER_INTERVAL_SECONDS: %w", err)
|
||||
@@ -160,7 +160,7 @@ func Load() (*Config, error) {
|
||||
MaxUploadBytes: maxUploadBytes,
|
||||
MaxImagePixels: maxImagePixels,
|
||||
|
||||
ReconcilerEnabled: reconcilerEnabled,
|
||||
// ReconcilerEnabled: reconcilerEnabled,
|
||||
ReconcilerInterval: time.Duration(reconcilerIntervalSec) * time.Second,
|
||||
ReconcilerGracePeriod: time.Duration(reconcilerGraceSec) * time.Second,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user