diff options
author | Sean Molenaar <sean@seanmolenaar.eu> | 2020-11-09 23:29:25 +0100 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2020-11-10 16:47:42 +0100 |
commit | 5bdc2df7f484f6618919a63247045027d43b78f7 (patch) | |
tree | 25a5f6a834d736e7c985bfa30c50099185a8f3b1 /lib/Command | |
parent | 3a1b406b193a395cb459b9e513168726d82e7c93 (diff) |
Fix unread count and related issues
Issue GH-924
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Diffstat (limited to 'lib/Command')
-rw-r--r-- | lib/Command/Updater/UpdateFeed.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Command/Updater/UpdateFeed.php b/lib/Command/Updater/UpdateFeed.php index 71e88a15f..93fa2a8d3 100644 --- a/lib/Command/Updater/UpdateFeed.php +++ b/lib/Command/Updater/UpdateFeed.php @@ -52,7 +52,7 @@ class UpdateFeed extends Command $userId = $input->getArgument('user-id'); try { $feed = $this->feedService->findForUser($userId, $feedId); - $this->feedService->fetch($feed); + $updated_feed = $this->feedService->fetch($feed); } catch (\Exception $e) { $output->writeln( '<error>Could not update feed with id ' . $feedId . @@ -62,6 +62,11 @@ class UpdateFeed extends Command return 1; } + if ($updated_feed->getUpdateErrorCount() !== 0) { + $output->writeln($updated_feed->getLastUpdateError()); + return 255; + } + return 0; } } |