summaryrefslogtreecommitdiffstats
path: root/backgroundjob/task.php
diff options
context:
space:
mode:
Diffstat (limited to 'backgroundjob/task.php')
-rw-r--r--backgroundjob/task.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/backgroundjob/task.php b/backgroundjob/task.php
index 587259378..1c602cce0 100644
--- a/backgroundjob/task.php
+++ b/backgroundjob/task.php
@@ -26,18 +26,19 @@
namespace OCA\News\Backgroundjob;
-use \OCA\News\DependencyInjection\DIContainer;
+use \OCA\News\App\News;
class Task {
static public function run() {
- $container = new DIContainer();
+ $app = new News();
+ $container = $app->getContainer();
// make it possible to turn off cron updates if you use an external
// script to execute updates in paralell
- if ($container['useCronUpdates']) {
+ if ($container['Config']->getUseCronUpdates()) {
$container['Updater']->beforeUpdate();
$container['Updater']->update();
$container['Updater']->afterUpdate();