示例#1
0
 /**
  * Common to all the jobs using the BatchJob table
  * 
  * @param unknown_type $id
  * @param kExclusiveLockKey $lockKey
  * @param BatchJob $dbBatchJob
  * @return Ambigous <BatchJob, NULL, unknown, multitype:>
  */
 public static function updateExclusiveBatchJob($id, kExclusiveLockKey $lockKey, BatchJob $dbBatchJob)
 {
     self::$currentUpdatingJob = $dbBatchJob;
     $dbBatchJob = kBatchExclusiveLock::updateExclusive($id, $lockKey, $dbBatchJob);
     $event = new kBatchJobStatusEvent($dbBatchJob);
     kEventsManager::raiseEvent($event);
     $dbBatchJob->reload();
     return $dbBatchJob;
 }