mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-11 14:54:33 -05:00
Fix/missed automated task execution failure crashes server on startup (#1019)
* Catch automated backup task errors * Catch automated udpate task errors * Catch automated webui update task errors
This commit is contained in:
@@ -84,9 +84,13 @@ object ProtoBackupExport : ProtoBackupBase() {
|
||||
}
|
||||
|
||||
val task = {
|
||||
cleanupAutomatedBackups()
|
||||
createAutomatedBackup()
|
||||
preferences.edit().putLong(LAST_AUTOMATED_BACKUP_KEY, System.currentTimeMillis()).apply()
|
||||
try {
|
||||
cleanupAutomatedBackups()
|
||||
createAutomatedBackup()
|
||||
preferences.edit().putLong(LAST_AUTOMATED_BACKUP_KEY, System.currentTimeMillis()).apply()
|
||||
} catch (e: Exception) {
|
||||
logger.error(e) { "scheduleAutomatedBackupTask: failed due to" }
|
||||
}
|
||||
}
|
||||
|
||||
val (hour, minute) = serverConfig.backupTime.value.split(":").map { it.toInt() }
|
||||
|
||||
Reference in New Issue
Block a user