MSP-6703 update clearInterval format

This commit is contained in:
likhachevam committed 2025-11-21 13:24:32 +03:00
1 parent 960b87d86d
commit 2f614a5c75
3 files changed
+11 -12

No files matched your search

+1 -2
View File
@@ -187,8 +187,7 @@ func (l Locator) Config() *Config {
cleanEventWorker := worker.New(cleanerJob, worker.WithInterval(cleanEventInterval))
cleanBackupsJob := event.NewBackupCleaner(l.leaderChecker, l.cfg.Local.Backup, l.logger)
cleanBackupsWorker := worker.New(cleanBackupsJob,
worker.WithInterval(time.Duration(l.cfg.Local.Backup.ClearIntervalDays)*24*time.Hour))
cleanBackupsWorker := worker.New(cleanBackupsJob, worker.WithInterval(l.cfg.Local.Backup.ClearInterval))
metricsSvc := metrics.New(backendRepo)
metricsController := controller.NewMetrics(metricsSvc)
+1 -1
View File
@@ -41,7 +41,7 @@ backup:
Enabled: true
Amount: 5
Interval: "24h"
ClearIntervalDays: 7
ClearInterval: "168h"
Sub:
Dir: "/app/data/backups/rqlite"
Name: "backup.sqlite.gz"
+9 -9
View File
@@ -201,15 +201,15 @@ type Config struct {
}
type Backup struct {
Enabled bool
Amount int
Version int
Type string
Interval string
ClearIntervalDays int
Timestamp bool
Vacuum bool
Sub Sub
Enabled bool
Amount int
Version int
Type string
Interval string
ClearInterval time.Duration
Timestamp bool
Vacuum bool
Sub Sub
}
type Sub struct {