+--------------------------------------------------------------------+
| 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$
*
*/
//log the execution of script
CRM_Core_Error::debug_log_message('ContributionProcessor.php');
-require_once 'CRM/Core/Lock.php';
-$lock = new CRM_Core_Lock('CiviContributeProcessor');
+$lock = Civi\Core\Container::singleton()->get('lockManager')->acquire('worker.contribute.CiviContributeProcessor');
if ($lock->isAcquired()) {
// try to unset any time limits
CiviContributeProcessor::process();
}
else {
- throw new Exception('Could not acquire lock, another CiviMailProcessor process is running');
+ throw new Exception('Could not acquire lock, another CiviContributeProcessor process is running');
}
$lock->release();