mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Check if the queue is suspended before attempting to index articles in the database.
This commit is contained in:
@@ -428,6 +428,9 @@ final class ArticlesTable: DatabaseTable {
|
||||
// MARK: - Indexing
|
||||
|
||||
func indexUnindexedArticles() {
|
||||
guard !queue.isSuspended else {
|
||||
return
|
||||
}
|
||||
queue.runInDatabase { (database) in
|
||||
let sql = "select articleID from articles where searchRowID is null limit 500;"
|
||||
guard let resultSet = database.executeQuery(sql, withArgumentsIn: nil) else {
|
||||
|
||||
@@ -70,7 +70,7 @@ final class SearchTable: DatabaseTable {
|
||||
}
|
||||
|
||||
func ensureIndexedArticles(for articleIDs: Set<String>) {
|
||||
if articleIDs.isEmpty {
|
||||
guard !queue.isSuspended && !articleIDs.isEmpty else {
|
||||
return
|
||||
}
|
||||
queue.runInTransaction { (database) in
|
||||
|
||||
Reference in New Issue
Block a user