Make articlesTable.ensureStatuses non-blocking.

This commit is contained in:
Brent Simmons 2019-07-08 21:09:54 -07:00
parent 3d0d6fa8a9
commit 33ff7c94c3
1 changed files with 2 additions and 4 deletions

View File

@ -271,13 +271,11 @@ final class ArticlesTable: DatabaseTable {
}
func ensureStatuses(_ articleIDs: Set<String>, _ statusKey: ArticleStatus.Key, _ flag: Bool) {
self.queue.updateSync { (database) in
self.queue.update { (database) in
let statusesDictionary = self.statusesTable.ensureStatusesForArticleIDs(articleIDs, false, database)
let statuses = Set(statusesDictionary.values)
_ = self.statusesTable.mark(statuses, statusKey, flag, database)
self.statusesTable.mark(statuses, statusKey, flag, database)
}
}
// MARK: Unread Counts