From 5080f4b6d7ce8401f6fa09132b7eaad099d42b52 Mon Sep 17 00:00:00 2001 From: Rich Lott / Artful Robot Date: Fri, 1 Sep 2023 09:50:19 +0100 Subject: [PATCH] Move to using CRM_Utils_Constant for CIVICRM_SLOW_SMART_GROUP_SECONDS --- CRM/Contact/BAO/GroupContactCache.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CRM/Contact/BAO/GroupContactCache.php b/CRM/Contact/BAO/GroupContactCache.php index 47d0c0cbd6..29f3c27dd0 100644 --- a/CRM/Contact/BAO/GroupContactCache.php +++ b/CRM/Contact/BAO/GroupContactCache.php @@ -173,11 +173,12 @@ AND ( $now = date('YmdHis'); if ($startTime) { $took = microtime(TRUE) - $startTime; - if (defined('CIVICRM_SLOW_SMART_GROUP_SECONDS') && $took > CIVICRM_SLOW_SMART_GROUP_SECONDS) { + $maxTime = CRM_Utils_Constant::value('CIVICRM_SLOW_SMART_GROUP_SECONDS'); + if ($maxTime && $took > $maxTime) { Civi::log()->warning( "Updating smart group $groupID took over " - . CIVICRM_SLOW_SMART_GROUP_SECONDS - . "s (" . number_format($took, 3) . "s)" + . $maxTime + . "s defined by CIVICRM_SLOW_SMART_GROUP_SECONDS (took " . number_format($took, 3) . "s)" ); } } -- 2.25.1