diff options
author | Benjamin Brahmer <info@b-brahmer.de> | 2020-10-29 08:21:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-29 08:21:01 +0100 |
commit | cfc75fb1d38318245abfc341939ef80cab0b0683 (patch) | |
tree | 03e575779248c7a2b2e75641f7225ceb6bdbfc76 /lib/Command/Updater | |
parent | ec6930da8226b9879eb2d7289af739aa96de43ef (diff) | |
parent | c5daf112bed9d958f70073fd1cb199beff322334 (diff) |
Merge branch 'master' into fix/dont_overload_getid
Diffstat (limited to 'lib/Command/Updater')
-rw-r--r-- | lib/Command/Updater/AfterUpdate.php | 2 | ||||
-rw-r--r-- | lib/Command/Updater/AllFeeds.php | 6 | ||||
-rw-r--r-- | lib/Command/Updater/UpdateFeed.php | 7 |
3 files changed, 9 insertions, 6 deletions
diff --git a/lib/Command/Updater/AfterUpdate.php b/lib/Command/Updater/AfterUpdate.php index 5746ff1e5..62ceb2710 100644 --- a/lib/Command/Updater/AfterUpdate.php +++ b/lib/Command/Updater/AfterUpdate.php @@ -46,7 +46,7 @@ class AfterUpdate extends Command { $count = $input->getArgument('purge_count'); - echo $this->itemService->purgeOverThreshold($count); + $output->writeln($this->itemService->purgeOverThreshold($count)); return 0; } diff --git a/lib/Command/Updater/AllFeeds.php b/lib/Command/Updater/AllFeeds.php index 6993d51ea..0dde6eac4 100644 --- a/lib/Command/Updater/AllFeeds.php +++ b/lib/Command/Updater/AllFeeds.php @@ -16,6 +16,12 @@ use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +/** + * Class AllFeeds + * + * @deprecated use news:feed:list instead + * @package OCA\News\Command\Updater + */ class AllFeeds extends Command { /** diff --git a/lib/Command/Updater/UpdateFeed.php b/lib/Command/Updater/UpdateFeed.php index 5078e92a4..71e88a15f 100644 --- a/lib/Command/Updater/UpdateFeed.php +++ b/lib/Command/Updater/UpdateFeed.php @@ -11,16 +11,12 @@ namespace OCA\News\Command\Updater; -use Exception; - use OCA\News\Service\FeedServiceV2; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use OCA\News\Service\FeedService; - class UpdateFeed extends Command { /** @@ -57,12 +53,13 @@ class UpdateFeed extends Command try { $feed = $this->feedService->findForUser($userId, $feedId); $this->feedService->fetch($feed); - } catch (Exception $e) { + } catch (\Exception $e) { $output->writeln( '<error>Could not update feed with id ' . $feedId . ' and user ' . $userId . ': ' . $e->getMessage() . '</error> ' ); + return 1; } return 0; |