From 9507e6a3ee7303a74f9c36b8d87cd0101c26d313 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Fri, 2 Aug 2013 15:31:55 +0200 Subject: make cron updater optional, created updater class for better updating handling, created a route for the api to clean up old stuff --- backgroundjob/task.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'backgroundjob') diff --git a/backgroundjob/task.php b/backgroundjob/task.php index 24470c1a6..d432aa8c2 100644 --- a/backgroundjob/task.php +++ b/backgroundjob/task.php @@ -34,10 +34,13 @@ class Task { static public function run() { $container = new DIContainer(); - $container['FolderBusinessLayer']->purgeDeleted(); - $container['FeedBusinessLayer']->purgeDeleted(); - $container['ItemBusinessLayer']->autoPurgeOld(); - $container['FeedBusinessLayer']->updateAll(); + + // make it possible to turn off cron updates if you use an external + // script to execute updates in paralell + if ($container['useCronUpdates']) { + $container['Updater']->cleanUp(); + $container['Updater']->update(); + } } -- cgit v1.2.3