diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-12-02 16:41:47 +0400 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2013-12-06 23:57:52 +0400 |
commit | 46a4ad4f3c634c7aaedd90805221386d8284b651 (patch) | |
tree | ad2789417617fb00e83c3e55b6d37131809785e7 /cron.php | |
parent | 3842c0d76635a4f1272b8dcfa2a7ba8392edf524 (diff) |
Catch exceptions from background jobs and log them
Diffstat (limited to 'cron.php')
-rw-r--r-- | cron.php | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -50,6 +50,8 @@ try { session_write_close(); + $logger = \OC_Log::$object; + // Don't do anything if ownCloud has not been installed if (!OC_Config::getValue('installed', false)) { exit(0); @@ -98,7 +100,7 @@ try { $jobList = new \OC\BackgroundJob\JobList(); $jobs = $jobList->getAll(); foreach ($jobs as $job) { - $job->execute($jobList); + $job->execute($jobList, $logger); } } else { // We call cron.php from some website @@ -109,7 +111,7 @@ try { // Work and success :-) $jobList = new \OC\BackgroundJob\JobList(); $job = $jobList->getNext(); - $job->execute($jobList); + $job->execute($jobList, $logger); $jobList->setLastJob($job); OC_JSON::success(); } |