}
// 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.