summaryrefslogtreecommitdiffstats
path: root/cron/updater.php
diff options
context:
space:
mode:
Diffstat (limited to 'cron/updater.php')
-rw-r--r--cron/updater.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/cron/updater.php b/cron/updater.php
index 84aadc8f0..d2c5aaa96 100644
--- a/cron/updater.php
+++ b/cron/updater.php
@@ -16,7 +16,8 @@ namespace OCA\News\Cron;
use OCA\News\AppInfo\Application;
use OCA\News\Config\Config;
-use \OCA\News\Utility\Updater as UpdaterService;
+use OCA\News\Service\StatusService;
+use OCA\News\Utility\Updater as UpdaterService;
class Updater {
@@ -28,7 +29,9 @@ class Updater {
// make it possible to turn off cron updates if you use an external
// script to execute updates in parallel
- if ($container->query(Config::class)->getUseCronUpdates()) {
+ $useCronUpdates = $container->query(Config::class)->getUseCronUpdates();
+ $isProperlyConfigured = $container->query(StatusService::class)->isProperlyConfigured();
+ if ($useCronUpdates && $isProperlyConfigured) {
$container->query(UpdaterService::class)->update();
$container->query(UpdaterService::class)->beforeUpdate();
$container->query(UpdaterService::class)->afterUpdate();