+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
}
// 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.
"INSERT IGNORE INTO civicrm_group_contact_cache (contact_id, group_id)
SELECT DISTINCT $idName, group_id FROM $tempTable
");
- CRM_Core_DAO::executeQuery(" DROP TABLE $tempTable");
+ CRM_Core_DAO::executeQuery(" DROP TEMPORARY TABLE $tempTable");
}
self::updateCacheTime($groupIDs, $processed);