From 4366dfec1704bef4bf753d16533fce62bdbb1372 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 2 Jun 2016 22:35:51 +0200 Subject: [PATCH] Log every failed background job in debug mode --- .../system/background/BackgroundQueueHandler.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- 2.20.1