mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Change so that we fire off status update immediately if the number of pending status changes exceeds 100. Issue #658
This commit is contained in:
@@ -39,6 +39,23 @@ final class SyncStatusTable: DatabaseTable {
|
||||
|
||||
}
|
||||
|
||||
func selectPendingCount() -> Int {
|
||||
|
||||
var count: Int = 0
|
||||
|
||||
self.queue.fetchSync { (database) in
|
||||
let sql = "select count(*) from syncStatus"
|
||||
if let resultSet = database.executeQuery(sql, withArgumentsIn: nil) {
|
||||
resultSet.next()
|
||||
count = Int(resultSet.int(forColumnIndex: 0))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return count
|
||||
|
||||
}
|
||||
|
||||
func resetSelectedForProcessing(_ articleIDs: [String]) {
|
||||
self.queue.update { database in
|
||||
let parameters = articleIDs.map { $0 as AnyObject }
|
||||
|
||||
Reference in New Issue
Block a user