Use "backupInterval" to disable auto backups (#608)

Gets rid of unnecessary setting
This commit is contained in:
schroda
2023-07-22 17:41:21 +02:00
committed by GitHub
parent d4f9b0b1bc
commit 2a83f290a5
4 changed files with 3 additions and 5 deletions

View File

@@ -56,7 +56,8 @@ object ProtoBackupExport : ProtoBackupBase() {
fun scheduleAutomatedBackupTask() {
HAScheduler.deschedule(backupSchedulerJobId)
if (!serverConfig.automatedBackups) {
val areAutomatedBackupsDisabled = serverConfig.backupInterval == 0
if (areAutomatedBackupsDisabled) {
return
}

View File

@@ -57,7 +57,6 @@ class ServerConfig(getConfig: () -> Config, moduleName: String = MODULE_NAME) :
var backupPath: String by overridableConfig
var backupTime: String by overridableConfig
var backupInterval: Int by overridableConfig
var automatedBackups: Boolean by overridableConfig
var backupTTL: Int by overridableConfig
companion object {