//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();