mirror of
https://github.com/usememos/memos.git
synced 2025-01-01 18:11:49 +08:00
chore: downgrade log level for auto backup disable (#2454)
downgrade log level for auto backup disable
This commit is contained in:
parent
1b34119e60
commit
20d3abb99a
1 changed files with 6 additions and 1 deletions
|
@ -32,11 +32,16 @@ func (r *BackupRunner) Run(ctx context.Context) {
|
|||
}
|
||||
|
||||
interval, err := strconv.Atoi(intervalStr)
|
||||
if err != nil || interval <= 0 {
|
||||
if err != nil || interval < 0 {
|
||||
log.Error(fmt.Sprintf("invalid SystemSettingAutoBackupIntervalName value %s, disable auto backup", intervalStr), zap.Error(err))
|
||||
return
|
||||
}
|
||||
|
||||
if interval == 0 {
|
||||
println("AutoBackupIntervalName value is 0, disable auto backup")
|
||||
return
|
||||
}
|
||||
|
||||
log.Info("enable auto backup every " + intervalStr + " seconds")
|
||||
ticker := time.NewTicker(time.Duration(interval) * time.Second)
|
||||
defer ticker.Stop()
|
||||
|
|
Loading…
Reference in a new issue