summaryrefslogtreecommitdiffstats
path: root/backgroundjob
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-04-09 16:13:18 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-04-09 22:52:27 +0200
commit673f26829d0badb4e2e8094df69bb7db45707761 (patch)
treea7024691ffdc36465ccbce0f15d0ee0bee475961 /backgroundjob
parent643fa4624dd7ba2db1349f16131bf330aeee3387 (diff)
fix backgroundjobs and hooks
Diffstat (limited to 'backgroundjob')
-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();