summaryrefslogtreecommitdiffstats
path: root/lib/Command/Updater
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Command/Updater')
-rw-r--r--lib/Command/Updater/AfterUpdate.php2
-rw-r--r--lib/Command/Updater/AllFeeds.php6
-rw-r--r--lib/Command/Updater/UpdateFeed.php7
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;