Merge pull request #1758 from kielgillard/ios-candidate

Log failures attempting to add new feeds to a Feedly account…
This commit is contained in:
Brent Simmons 2020-01-31 18:26:57 -08:00 committed by GitHub
commit 2f9506a8b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -84,6 +84,7 @@ class FeedlyAddNewFeedOperation: FeedlyOperation, FeedlyOperationDelegate, Feedl
operationQueue.addOperation(addRequest) operationQueue.addOperation(addRequest)
let createFeeds = FeedlyCreateFeedsForCollectionFoldersOperation(account: account, feedsAndFoldersProvider: addRequest, log: log) let createFeeds = FeedlyCreateFeedsForCollectionFoldersOperation(account: account, feedsAndFoldersProvider: addRequest, log: log)
createFeeds.delegate = self
createFeeds.addDependency(addRequest) createFeeds.addDependency(addRequest)
createFeeds.downloadProgress = downloadProgress createFeeds.downloadProgress = downloadProgress
operationQueue.addOperation(createFeeds) operationQueue.addOperation(createFeeds)
@ -91,17 +92,20 @@ class FeedlyAddNewFeedOperation: FeedlyOperation, FeedlyOperationDelegate, Feedl
let syncUnread = FeedlyIngestUnreadArticleIdsOperation(account: account, credentials: credentials, service: syncUnreadIdsService, database: database, newerThan: nil, log: log) let syncUnread = FeedlyIngestUnreadArticleIdsOperation(account: account, credentials: credentials, service: syncUnreadIdsService, database: database, newerThan: nil, log: log)
syncUnread.addDependency(createFeeds) syncUnread.addDependency(createFeeds)
syncUnread.downloadProgress = downloadProgress syncUnread.downloadProgress = downloadProgress
syncUnread.delegate = self
operationQueue.addOperation(syncUnread) operationQueue.addOperation(syncUnread)
let syncFeed = FeedlySyncStreamContentsOperation(account: account, resource: feedResourceId, service: getStreamContentsService, isPagingEnabled: false, newerThan: nil, log: log) let syncFeed = FeedlySyncStreamContentsOperation(account: account, resource: feedResourceId, service: getStreamContentsService, isPagingEnabled: false, newerThan: nil, log: log)
syncFeed.addDependency(syncUnread) syncFeed.addDependency(syncUnread)
syncFeed.downloadProgress = downloadProgress syncFeed.downloadProgress = downloadProgress
syncFeed.delegate = self
operationQueue.addOperation(syncFeed) operationQueue.addOperation(syncFeed)
let finishOperation = FeedlyCheckpointOperation() let finishOperation = FeedlyCheckpointOperation()
finishOperation.checkpointDelegate = self finishOperation.checkpointDelegate = self
finishOperation.downloadProgress = downloadProgress finishOperation.downloadProgress = downloadProgress
finishOperation.addDependency(syncFeed) finishOperation.addDependency(syncFeed)
finishOperation.delegate = self
operationQueue.addOperation(finishOperation) operationQueue.addOperation(finishOperation)
} }
@ -109,6 +113,8 @@ class FeedlyAddNewFeedOperation: FeedlyOperation, FeedlyOperationDelegate, Feedl
addCompletionHandler?(.failure(error)) addCompletionHandler?(.failure(error))
addCompletionHandler = nil addCompletionHandler = nil
os_log(.debug, log: log, "Unable to add new feed: %{public}@.", error as NSError)
cancel() cancel()
} }