Skip to content

Commit aa01bc1

Browse files
committed
fix: record continued background sync runs
Signed-off-by: Tommy van der Vorst <tommy@pixelspark.nl>
1 parent 1ea8fa3 commit aa01bc1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sushitrain/BackgroundManager.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ enum ContinuedTaskType {
159159
}
160160

161161
Task {
162+
var run = BackgroundSyncRun(started: Date.now, taskType: .continued)
162163
// Perform the requested continued task
163164
switch taskType {
164165
case .time(seconds: let duration):
@@ -198,6 +199,9 @@ enum ContinuedTaskType {
198199
task.setTaskCompleted(success: true)
199200
continuedTask.updateTitle(continuedTask.title, subtitle: String(localized: "Finished"))
200201
self.runningContinuedTask = nil
202+
run.ended = Date.now
203+
self.lastBackgroundSyncRun = run
204+
self.updateBackgroundRunHistory(appending: run)
201205
Log.info("Continued processing task done")
202206
}
203207
}

0 commit comments

Comments
 (0)