@@ -39,7 +39,7 @@ class ResticScheduler: Model, ResticSchedulerProtocol {
3939
4040 private var isBackupStale : Bool {
4141 let interval = Duration . seconds ( AppEnvironment . shared. backupFrequency)
42- return self . lastSuccessfulBackup == nil || self . lastSuccessfulBackup!. timeIntervalSinceNow >= TimeInterval ( interval. components. seconds * 2 )
42+ return lastSuccessfulBackup == nil || lastSuccessfulBackup!. timeIntervalSinceNow >= TimeInterval ( interval. components. seconds * 2 )
4343 }
4444
4545 override private init ( ) {
@@ -120,7 +120,7 @@ class ResticScheduler: Model, ResticSchedulerProtocol {
120120 backupScheduler!. interval = TimeInterval ( interval. components. seconds)
121121 backupScheduler!. repeats = true
122122 backupScheduler!. schedule { [ weak self] completion in
123- guard let self, let scheduler = self . backupScheduler else {
123+ guard let self, let scheduler = backupScheduler else {
124124 completion ( . deferred)
125125 return
126126 }
@@ -148,7 +148,7 @@ class ResticScheduler: Model, ResticSchedulerProtocol {
148148 staleBackupScheduler!. qualityOfService = . background
149149 staleBackupScheduler!. interval = TimeInterval ( Self . staleBackupCheckInterval. components. seconds)
150150 staleBackupScheduler!. schedule { [ weak self] completion in
151- guard let self, let scheduler = self . staleBackupScheduler else {
151+ guard let self, let scheduler = staleBackupScheduler else {
152152 completion ( . deferred)
153153 return
154154 }
@@ -157,7 +157,7 @@ class ResticScheduler: Model, ResticSchedulerProtocol {
157157 completion ( . deferred)
158158 return
159159 }
160- guard self . isBackupStale else {
160+ guard isBackupStale else {
161161 completion ( . finished)
162162 return
163163 }
@@ -169,7 +169,7 @@ class ResticScheduler: Model, ResticSchedulerProtocol {
169169 }
170170 }
171171 }
172- TypeLogger . function ( ) . info ( " Rescheduled stale backup check, interval: \( Self . staleBackupCheckInterval. formatted ( . units( allowed: [ . days, . hours, . minutes, . seconds] , width: . wide) ) , privacy: . public) , stale: \( self . isBackupStale) " )
172+ TypeLogger . function ( ) . info ( " Rescheduled stale backup check, interval: \( Self . staleBackupCheckInterval. formatted ( . units( allowed: [ . days, . hours, . minutes, . seconds] , width: . wide) ) , privacy: . public) , stale: \( self . isBackupStale, privacy : . public ) " )
173173 }
174174 }
175175}
0 commit comments