当前位置: 首页>>代码示例>>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;未经允许,请勿转载。