當前位置: 首頁>>代碼示例>>PHP>>正文


PHP kJobsManager::abortJob方法代碼示例

本文整理匯總了PHP中kJobsManager::abortJob方法的典型用法代碼示例。如果您正苦於以下問題:PHP kJobsManager::abortJob方法的具體用法?PHP kJobsManager::abortJob怎麽用?PHP kJobsManager::abortJob使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在kJobsManager的用法示例。


在下文中一共展示了kJobsManager::abortJob方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: abortAction

 /**
  * Aborts the bulk upload and all its child jobs
  * 
  * @action abort
  * @param int $id job id
  * @return KalturaBulkUpload
  */
 function abortAction($id)
 {
     $c = new Criteria();
     $c->addAnd(BatchJobPeer::ID, $id);
     $c->addAnd(BatchJobPeer::PARTNER_ID, $this->getPartnerId());
     $c->addAnd(BatchJobPeer::JOB_TYPE, BatchJobType::BULKUPLOAD);
     $batchJob = BatchJobPeer::doSelectOne($c);
     if (!$batchJob) {
         throw new KalturaAPIException(KalturaErrors::BULK_UPLOAD_NOT_FOUND, $id);
     }
     kJobsManager::abortJob($id, BatchJobType::BULKUPLOAD, true);
     $batchJobLog = BatchJobLogPeer::retrieveByBatchJobId($id);
     $ret = new KalturaBulkUpload();
     if ($batchJobLog) {
         $ret->fromObject($batchJobLog, $this->getResponseProfile());
     }
     return $ret;
 }
開發者ID:DBezemer,項目名稱:server,代碼行數:25,代碼來源:BulkService.php

示例2: abortJobAction

 /**
  * batch abortJobAction aborts and returns the status of task
  * 
  * @action abortJob
  * @param int $jobId the id of the job  
  * @param KalturaBatchJobType $jobType the type of the job  
  * @return KalturaBatchJobResponse 
  */
 function abortJobAction($jobId, $jobType)
 {
     $dbJobType = kPluginableEnumsManager::apiToCore('BatchJobType', $jobType);
     kJobsManager::abortJob($jobId, $dbJobType);
     return $this->getStatusAction($jobId, $jobType);
 }
開發者ID:EfncoPlugins,項目名稱:Media-Management-based-on-Kaltura,代碼行數:14,代碼來源:JobsService.php

示例3: abortAction

 /**
  * Aborts the bulk upload and all its child jobs
  * 
  * @action abort
  * @param bigint $id job id
  * @return KalturaBulkUpload
  */
 public function abortAction($id)
 {
     $c = new Criteria();
     $c->addAnd(BatchJobPeer::ID, $id);
     $c->addAnd(BatchJobPeer::PARTNER_ID, $this->getPartnerId());
     $c->addAnd(BatchJobPeer::JOB_TYPE, BatchJobType::BULKUPLOAD);
     $batchJob = BatchJobPeer::doSelectOne($c);
     if (!$batchJob) {
         $c = new Criteria();
         $c->addAnd(BatchJobLogPeer::JOB_ID, $id);
         $c->addAnd(BatchJobLogPeer::PARTNER_ID, $this->getPartnerId());
         $c->addAnd(BatchJobLogPeer::JOB_TYPE, BatchJobType::BULKUPLOAD);
         $crit = $c->getNewCriterion(BatchJobLogPeer::ABORT, null);
         $critOr = $c->getNewCriterion(BatchJobLogPeer::ABORT, 0);
         $crit->addOr($critOr);
         $c->add($crit);
         $batchJobLog = BatchJobLogPeer::doSelectOne($c);
         if (!$batchJobLog) {
             throw new KalturaAPIException(KalturaErrors::BULK_UPLOAD_NOT_FOUND, $id);
         }
         $batchJobLog->setAbort(BatchJobExecutionStatus::ABORTED);
         $batchJobLog->save();
     } else {
         kJobsManager::abortJob($id, BatchJobType::BULKUPLOAD, true);
     }
     $batchJobLog = BatchJobLogPeer::retrieveByBatchJobId($id);
     $ret = new KalturaBulkUpload();
     $ret->fromObject($batchJobLog, $this->getResponseProfile());
     return $ret;
 }
開發者ID:dozernz,項目名稱:server,代碼行數:37,代碼來源:BulkUploadService.php


注:本文中的kJobsManager::abortJob方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。