Merge pull request #6091 from davecivicrm/CRM-16747
[civicrm-core.git] / CRM / Contact / BAO / GroupContactCache.php
index 7267bd80e243feb5f485ca65e00173461fe0f06b..a1cf6d594e87940aa3b09b1a5c1415bf47c97f06 100644 (file)
@@ -434,8 +434,7 @@ WHERE  id = %1
     }
 
     // grab a lock so other processes dont compete and do the same query
-    $lockName = "civicrm.group.{$groupID}";
-    $lock = new CRM_Core_Lock($lockName);
+    $lock = Civi\Core\Container::singleton()->get('lockManager')->acquire("data.core.group.{$groupID}");
     if (!$lock->isAcquired()) {
       // this can cause inconsistent results since we dont know if the other process
       // will fill up the cache before our calling routine needs it.