From 333411535e49d64c848cf7b27d451f071559cc97 Mon Sep 17 00:00:00 2001 From: Guillaume Lajarige Date: Fri, 29 Dec 2017 09:55:36 +0000 Subject: [PATCH] =?UTF-8?q?N=C2=B01132=20Add=20ContextTag=20on=20CRON=20ba?= =?UTF-8?q?ckground=20tasks=20(eg.=20"CRON:Task:").?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduced for the "Mail to ticket automation" extension, so we know when a Ticket is created/updated from an email. SVN:trunk[5181] --- webservices/cron.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webservices/cron.php b/webservices/cron.php index 06a6bf290..f8603950f 100644 --- a/webservices/cron.php +++ b/webservices/cron.php @@ -88,6 +88,7 @@ function RunTask($oProcess, BackgroundTask $oTask, $oStartDate, $iTimeLimit) { $oNow = new DateTime(); $fStart = microtime(true); + $oCtx = new ContextTag('CRON:Task:'.$oTask->Get('class_name')); $sMessage = ""; $oExceptionToThrow = null; @@ -145,6 +146,8 @@ function RunTask($oProcess, BackgroundTask $oTask, $oStartDate, $iTimeLimit) throw $oExceptionToThrow; } + unset($oCtx); + return $sMessage; }