当前位置: 首页>>代码示例>>PHP>>正文


PHP BatchJobPeer::retrieveByEntryId方法代码示例

本文整理汇总了PHP中BatchJobPeer::retrieveByEntryId方法的典型用法代码示例。如果您正苦于以下问题:PHP BatchJobPeer::retrieveByEntryId方法的具体用法?PHP BatchJobPeer::retrieveByEntryId怎么用?PHP BatchJobPeer::retrieveByEntryId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BatchJobPeer的用法示例。


在下文中一共展示了BatchJobPeer::retrieveByEntryId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: abortEntryJobs

 public static function abortEntryJobs($entryId)
 {
     $dbBatchJobs = BatchJobPeer::retrieveByEntryId($entryId);
     foreach ($dbBatchJobs as $dbBatchJob) {
         self::abortDbBatchJob($dbBatchJob);
     }
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:7,代码来源:kJobsManager.php

示例2: addBulkUploadResultAction

 /**
  * batch addBulkUploadResultAction action adds KalturaBulkUploadResult to the DB
  * 
  * @action addBulkUploadResult
  * @param KalturaBulkUploadResult $bulkUploadResult The results to save to the DB
  * @param KalturaBulkUploadPluginDataArray $pluginDataArray
  * @return KalturaBulkUploadResult 
  */
 function addBulkUploadResultAction(KalturaBulkUploadResult $bulkUploadResult, KalturaBulkUploadPluginDataArray $pluginDataArray = null)
 {
     if (is_null($bulkUploadResult->action)) {
         $bulkUploadResult->action = KalturaBulkUploadAction::ADD;
     }
     $bulkUploadResult->pluginsData = $pluginDataArray;
     $dbBulkUploadResult = BulkUploadResultPeer::retrieveByBulkUploadIdAndIndex($bulkUploadResult->bulkUploadJobId, $bulkUploadResult->lineIndex);
     if ($dbBulkUploadResult) {
         $dbBulkUploadResult = $bulkUploadResult->toUpdatableObject($dbBulkUploadResult);
     } else {
         $dbBulkUploadResult = $bulkUploadResult->toInsertableObject();
     }
     /* @var $dbBulkUploadResult BulkUploadResult */
     $dbBulkUploadResult->save();
     if ($bulkUploadResult->objectId) {
         $dbBulkUploadResult->handleRelatedObjects();
         $jobs = BatchJobPeer::retrieveByEntryId($bulkUploadResult->objectId);
         foreach ($jobs as $job) {
             if (!$job->getParentJobId()) {
                 $job->setRootJobId($bulkUploadResult->bulkUploadJobId);
                 $job->setBulkJobId($bulkUploadResult->bulkUploadJobId);
                 $job->save();
             }
         }
         if ($dbBulkUploadResult->getObject() && $pluginDataArray && $pluginDataArray->count) {
             $pluginValues = $pluginDataArray->toValuesArray();
             if (count($pluginValues)) {
                 $pluginInstances = KalturaPluginManager::getPluginInstances('IKalturaBulkUploadHandler');
                 foreach ($pluginInstances as $pluginInstance) {
                     $pluginInstance->handleBulkUploadData($dbBulkUploadResult->getObject(), $pluginValues);
                 }
             }
         }
     }
     $bulkUploadResult->fromObject($dbBulkUploadResult);
     return $bulkUploadResult;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:45,代码来源:BatchService.php

示例3: getBatchJobs

 public function getBatchJobs()
 {
     return BatchJobPeer::retrieveByEntryId($this->getId());
 }
开发者ID:AdiTal,项目名称:server,代码行数:4,代码来源:entry.php

示例4: deleteEntry

 public static function deleteEntry(entry $entry, $partner_id = null, $onlyIfAllJobsDone = false)
 {
     if ($entry->getStatus() == entryStatus::DELETED || $entry->getStatus() == entryStatus::BLOCKED) {
         return;
     }
     // don't do this twice !
     if ($onlyIfAllJobsDone) {
         KalturaLog::DEBUG("onlyIfAllJobsDone = " . (int) $onlyIfAllJobsDone);
         $dbEntryBatchJobs = BatchJobPeer::retrieveByEntryId($entry->getId());
         foreach ($dbEntryBatchJobs as $job) {
             /* @var $job BatchJob */
             if (in_array($job->getStatus(), BatchJobPeer::getUnClosedStatusList())) {
                 KalturaLog::DEBUG("Entry [" . $entry->getId() . "] still has an unhandled batchjob [" . $job->getId() . "] with status [" . $job->getStatus() . "] - aborting deletion process.");
                 //mark entry for later deletion
                 $entry->setMarkedForDeletion(true);
                 $entry->save();
                 return;
             }
         }
     }
     KalturaLog::log("myEntryUtils::delete Entry [" . $entry->getId() . "] Partner [" . $entry->getPartnerId() . "]");
     kJobsManager::abortEntryJobs($entry->getId());
     $media_type = $entry->getMediaType();
     $need_to_fix_roughcut = false;
     $thumb_template_file = "&deleted_image.jpg";
     KalturaLog::log("media type [{$media_type}]");
     switch ($media_type) {
         case entry::ENTRY_MEDIA_TYPE_AUDIO:
             $template_file = "&deleted_audio.flv";
             $need_to_fix_roughcut = true;
             break;
         case entry::ENTRY_MEDIA_TYPE_IMAGE:
             $template_file = "&deleted_image.jpg";
             $need_to_fix_roughcut = false;
             // no need to add a batch job for images
             break;
         case entry::ENTRY_MEDIA_TYPE_VIDEO:
             $template_file = "&deleted_video.flv";
             $need_to_fix_roughcut = true;
             break;
         case entry::ENTRY_MEDIA_TYPE_LIVE_STREAM_FLASH:
         case entry::ENTRY_MEDIA_TYPE_LIVE_STREAM_WINDOWS_MEDIA:
         case entry::ENTRY_MEDIA_TYPE_LIVE_STREAM_REAL_MEDIA:
         case entry::ENTRY_MEDIA_TYPE_LIVE_STREAM_QUICKTIME:
             kJobsManager::addProvisionDeleteJob(null, $entry);
             break;
         case entry::ENTRY_MEDIA_TYPE_SHOW:
         default:
             $template_file = "&deleted_rc.xml";
             $need_to_fix_roughcut = false;
             break;
     }
     // in this case we'll need some batch job to fix all related roughcuts for this entry
     // use the batch_job mechanism to indicate there is a deleted entry to handle
     if ($need_to_fix_roughcut) {
         //			Should use a different job type
         //			BatchJob::createDeleteEntryJob ( $entry );
     }
     $entry->putInCustomData("deleted_original_data", $entry->getData());
     $entry->putInCustomData("deleted_original_thumb", $entry->getThumbnail());
     $content_path = myContentStorage::getFSContentRootPath();
     //		Remarked by Tan-Tan 27/09/2010
     //		Handled by kObjectDeleteHandler
     //		$currentDataKey = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_DATA); // replaced__getDataPath
     //		$currentDataEditKey = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_DATA_EDIT); // replaced__getDataPathEdit
     //		$currentThumbKey = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_THUMB); // replaced__getThumbnailPath
     $entry->setData($entry->getData());
     // once to increment the verions
     $entry->setData($template_file);
     // the other to set the template
     $entry->setThumbnail($entry->getThumbnail());
     // once to increment the verions
     $entry->setThumbnail($thumb_template_file);
     // the other to set the template
     //		Remarked by Tan-Tan 27/09/2010
     //		Handled by kObjectDeleteHandler
     //		// move file so there will be no access to it
     //		$deleted_content = kFileSyncUtils::deleteSyncFileForKey($currentDataKey);
     //		$deleted_content .= "|" . kFileSyncUtils::deleteSyncFileForKey($currentDataEditKey,false); // for some entries there may not be an edit version
     //		$deleted_content .= "|" . kFileSyncUtils::deleteSyncFileForKey($currentThumbKey,false); // for some entries (empty mix / audio) there may not be a thumb FileSync
     //		Remarked by Tan-Tan 27/09/2010
     //		$deleted_content is always null anyway
     //		$entry->putInCustomData( "deleted_file_path" , $deleted_content ? $deleted_content : serialize($currentDataKey) ) ;
     $entry->setStatus(entryStatus::DELETED);
     //$entry->setCategories("");
     // make sure the moderation_status is set to moderation::MODERATION_STATUS_DELETE
     $entry->setModerationStatus(moderation::MODERATION_STATUS_DELETE);
     $entry->setModifiedAt(time());
     $entry->save();
     myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_ENTRY_DELETE, $entry, null, null, null, null, $entry->getId());
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:91,代码来源:myEntryUtils.class.php


注:本文中的BatchJobPeer::retrieveByEntryId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。