Delete orphaned sync status records.
This commit is contained in:
parent
b7b3d2b3ee
commit
e02eb504fe
@ -130,13 +130,14 @@ private extension CloudKitSendStatusOperation {
|
||||
}
|
||||
|
||||
// If this happens, we have somehow gotten into a state where we have new status records
|
||||
// but the articles didn't come back in the fetch. Rather than crashing, we continue processing
|
||||
// and hope that it gets cleared up later.
|
||||
guard !statusUpdates.isEmpty else {
|
||||
// but the articles didn't come back in the fetch. We need to clean up those sync records
|
||||
// and continue processing.
|
||||
if statusUpdates.isEmpty {
|
||||
self.database.deleteSelectedForProcessing(articleIDs) { _ in
|
||||
done(false)
|
||||
return
|
||||
}
|
||||
|
||||
} else {
|
||||
articlesZone.modifyArticles(statusUpdates) { result in
|
||||
switch result {
|
||||
case .success:
|
||||
@ -151,6 +152,7 @@ private extension CloudKitSendStatusOperation {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user