From: Tim Düsterhus Date: Thu, 2 Jun 2016 20:35:51 +0000 (+0200) Subject: Log every failed background job in debug mode X-Git-Tag: 3.0.0_Beta_1~1540 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4366dfec1704bef4bf753d16533fce62bdbb1372;p=GitHub%2FWoltLab%2FWCF.git Log every failed background job in debug mode --- diff --git a/wcfsetup/install/files/lib/system/background/BackgroundQueueHandler.class.php b/wcfsetup/install/files/lib/system/background/BackgroundQueueHandler.class.php index 10a5310607..e34a224cd7 100644 --- a/wcfsetup/install/files/lib/system/background/BackgroundQueueHandler.class.php +++ b/wcfsetup/install/files/lib/system/background/BackgroundQueueHandler.class.php @@ -100,6 +100,10 @@ class BackgroundQueueHandler extends SingletonFactory { if ($job->getFailures() <= $job::MAX_FAILURES) { $this->enqueueIn($job, $job->retryAfter()); + + if (WCF::debugModeIsEnabled()) { + \wcf\functions\exception\logThrowable($e); + } } else { // job failed too often: log @@ -112,6 +116,10 @@ class BackgroundQueueHandler extends SingletonFactory { if ($job->getFailures() <= $job::MAX_FAILURES) { $this->enqueueIn($job, $job->retryAfter()); + + if (WCF::debugModeIsEnabled()) { + \wcf\functions\exception\logThrowable($e); + } } else { // job failed too often: log