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


PHP BatchJob::setObjectType方法代碼示例

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


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

示例1: addFileSyncImportJob

 /**
  * @param string $entryId
  * @param FileSync $object
  * @param int $fileSyncId
  * @param string $sourceFileUrl
  * @return BatchJob
  */
 public static function addFileSyncImportJob($entryId, FileSync $fileSync, $sourceFileUrl, BatchJob $parentJob = null, $fileSize = null)
 {
     $partnerId = $fileSync->getPartnerId();
     $fileSyncId = $fileSync->getId();
     $dc = $fileSync->getDc();
     KalturaLog::log(__METHOD__ . " entryId[{$entryId}], partnerId[{$partnerId}], fileSyncId[{$fileSyncId}], sourceFileUrl[{$sourceFileUrl}]");
     $fileSyncImportData = new kFileSyncImportJobData();
     $fileSyncImportData->setSourceUrl($sourceFileUrl);
     $fileSyncImportData->setFilesyncId($fileSyncId);
     $fileSyncImportData->setFileSize($fileSize);
     // tmpFilePath and destFilePath will be set later during get exlusive call on the target data center
     $batchJob = null;
     if ($parentJob) {
         $batchJob = $parentJob->createChild(BatchJobType::FILESYNC_IMPORT, null, true, $dc);
     } else {
         $batchJob = new BatchJob();
         $batchJob->setDc($dc);
         $batchJob->setEntryId($entryId);
         $batchJob->setPartnerId($partnerId);
     }
     $batchJob->setObjectId($fileSyncId);
     $batchJob->setObjectType(BatchJobObjectType::FILE_SYNC);
     //In case file sync is of type data and holds flavor asset than we need to check if its the source asset that is being synced and raise it sync priority
     if ($fileSync->getObjectType() == FileSyncObjectType::FLAVOR_ASSET && $fileSync->getObjectSubType() == entry::FILE_SYNC_ENTRY_SUB_TYPE_DATA && $fileSync->getFileType() == FileSync::FILE_SYNC_FILE_TYPE_FILE) {
         $assetdb = assetPeer::retrieveById($fileSync->getObjectId());
         if ($assetdb) {
             $isSourceAsset = $assetdb->getIsOriginal();
             if ($isSourceAsset) {
                 $fileSyncImportData->setIsSourceAsset(true);
             }
         }
     }
     KalturaLog::log("Creating Filesync Import job, with file sync id: {$fileSyncId} size: {$fileSize}");
     return kJobsManager::addJob($batchJob, $fileSyncImportData, BatchJobType::FILESYNC_IMPORT);
 }
開發者ID:AdiTal,項目名稱:server,代碼行數:42,代碼來源:kMultiCentersManager.php

示例2: addParseMultiLanguageCaptionAssetJob

 public static function addParseMultiLanguageCaptionAssetJob($captionAsset, $fileLocation)
 {
     $batchJob = new BatchJob();
     $id = $captionAsset->getId();
     $entryId = $captionAsset->getEntryId();
     $jobData = new kParseMultiLanguageCaptionAssetJobData();
     $jobData->setMultiLanaguageCaptionAssetId($id);
     $jobData->setEntryId($entryId);
     $jobData->setFileLocation($fileLocation);
     $jobType = CaptionPlugin::getBatchJobTypeCoreValue(ParseMultiLanguageCaptionAssetBatchType::PARSE_MULTI_LANGUAGE_CAPTION_ASSET);
     $batchJob->setObjectType(BatchJobObjectType::ASSET);
     $batchJob->setEntryId($entryId);
     $batchJob->setPartnerId($captionAsset->getPartnerId());
     $batchJob->setObjectId($id);
     return kJobsManager::addJob($batchJob, $jobData, $jobType);
 }
開發者ID:DBezemer,項目名稱:server,代碼行數:16,代碼來源:kCaptionsContentManager.php

示例3: reconvertEntry

 private function reconvertEntry($entry_id, $conversion_profile_id, $job_priority)
 {
     $entry = entryPeer::retrieveByPK($entry_id);
     $this->error = "";
     if (!$entry) {
         $error = "Cannot reconvert entry [{$entry_id}]. Might be a deleted entry";
         return array($entry_id, null, null, $error);
     }
     $flavorAsset = assetPeer::retrieveOriginalByEntryId($entry_id);
     if (!$flavorAsset) {
         $flavorAsset = assetPeer::retrieveReadyWebByEntryId($entry_id);
         if (!$flavorAsset) {
             $flavorAssets = assetPeer::retrieveFlavorsByEntryId($entry_id);
             if (!$flavorAssets) {
                 $error = "Cannot find good enough flavor asset to re-convert from";
                 return array($entry_id, $entry, null, $error);
             }
             $flavorAsset = $flavorAssets[0];
             // choose the first one
         }
     }
     $syncKey = $flavorAsset->getSyncKey(flavorAsset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);
     $filePath = kFileSyncUtils::getReadyLocalFilePathForKey($syncKey);
     if (!$filePath) {
         $error = "Cannot find a fileSync for the flavorAsset [" . $flavorAsset->getId() . "]";
         return array($entry_id, $entry, null, $error);
     }
     $dbBatchJob = new BatchJob();
     $dbBatchJob->setEntryId($entry_id);
     $dbBatchJob->setPartnerId($entry->getPartnerId());
     $dbBatchJob->setStatus(BatchJob::BATCHJOB_STATUS_PENDING);
     $dbBatchJob->setDc(kDataCenterMgr::getCurrentDcId());
     //$dbBatchJob->setPriority ( $job_priority ); Not supported anymore
     $dbBatchJob->setObjectId($entry_id);
     $dbBatchJob->setObjectType(BatchJobObjectType::ENTRY);
     $dbBatchJob->setJobType(BatchJobType::CONVERT_PROFILE);
     $dbBatchJob->save();
     // creates a convert profile job
     $convertProfileData = new kConvertProfileJobData();
     $convertProfileData->setFlavorAssetId($flavorAsset->getId());
     $convertProfileData->setInputFileSyncLocalPath($filePath);
     kJobsManager::addJob($dbBatchJob, $convertProfileData, BatchJobType::CONVERT_PROFILE);
     // save again afget the addJob
     $dbBatchJob->save();
     return array($entry_id, $entry, $dbBatchJob, $error);
 }
開發者ID:DBezemer,項目名稱:server,代碼行數:46,代碼來源:reconvertAction.class.php

示例4: addVirusScanJob

 /**
  * @param BatchJob $parentJob
  * @param int $partnerId
  * @param string $entryId
  * @param string $flavorAssetId
  * @param string $srcFilePath
  * @param VirusScanEngineType $virusScanEngine
  * @param int $scanProfileId
  * @return BatchJob
  */
 public static function addVirusScanJob(BatchJob $parentJob = null, $partnerId, $entryId, $flavorAssetId, $srcFilePath, $virusScanEngine, $virusFoundAction)
 {
     $jobType = VirusScanPlugin::getBatchJobTypeCoreValue(VirusScanBatchJobType::VIRUS_SCAN);
     $jobData = new kVirusScanJobData();
     $jobData->setSrcFilePath($srcFilePath);
     $jobData->setFlavorAssetId($flavorAssetId);
     $jobData->setVirusFoundAction($virusFoundAction);
     $batchJob = null;
     if ($parentJob) {
         $batchJob = $parentJob->createChild($jobType, $virusScanEngine);
     } else {
         $batchJob = new BatchJob();
         $batchJob->setEntryId($entryId);
         $batchJob->setPartnerId($partnerId);
     }
     $batchJob->setObjectId($flavorAssetId);
     $batchJob->setObjectType(BatchJobObjectType::ASSET);
     return self::addJob($batchJob, $jobData, $jobType, $virusScanEngine);
 }
開發者ID:DBezemer,項目名稱:server,代碼行數:29,代碼來源:kVirusScanJobsManager.php

示例5: addintegrationJob

 public static function addintegrationJob($objectType, $objectId, kIntegrationJobData $data)
 {
     $partnerId = kCurrentContext::getCurrentPartnerId();
     $batchJob = new BatchJob();
     $batchJob->setPartnerId($partnerId);
     $batchJob->setObjectType($objectType);
     $batchJob->setObjectId($objectId);
     if ($objectType == BatchJobObjectType::ENTRY) {
         $batchJob->setEntryId($objectId);
     } elseif ($objectType == BatchJobObjectType::ASSET) {
         $asset = assetPeer::retrieveById($objectId);
         if ($asset) {
             $batchJob->setEntryId($asset->getEntryId());
         }
     }
     $batchJob->setStatus(BatchJob::BATCHJOB_STATUS_DONT_PROCESS);
     $jobType = IntegrationPlugin::getBatchJobTypeCoreValue(IntegrationBatchJobType::INTEGRATION);
     $batchJob = kJobsManager::addJob($batchJob, $data, $jobType, $data->getProviderType());
     return kJobsManager::updateBatchJob($batchJob, BatchJob::BATCHJOB_STATUS_PENDING);
 }
開發者ID:visomar,項目名稱:server,代碼行數:20,代碼來源:kIntegrationFlowManager.php

示例6: addEventNotificationDispatchJob

 /**
  * @param int $eventNotificationType
  * @param kEventNotificationDispatchJobData $jobData
  * @param string $partnerId
  * @param string $entryId
  * @param BatchJob $parentJob
  * @return BatchJob
  */
 protected function addEventNotificationDispatchJob($eventNotificationType, kEventNotificationDispatchJobData $jobData, $partnerId = null, $entryId = null, BatchJob $parentJob = null)
 {
     $jobType = EventNotificationPlugin::getBatchJobTypeCoreValue(EventNotificationBatchType::EVENT_NOTIFICATION_HANDLER);
     $batchJob = null;
     if ($parentJob) {
         $batchJob = $parentJob->createChild($jobType, $eventNotificationType, false);
     } else {
         $batchJob = new BatchJob();
         $batchJob->setEntryId($entryId);
         if (!$partnerId) {
             $partnerId = kCurrentContext::getCurrentPartnerId();
         }
         $batchJob->setPartnerId($partnerId);
     }
     KalturaLog::log("Creating event notification dispatch job on template id [" . $jobData->getTemplateId() . "] engine[{$eventNotificationType}]");
     $batchJob->setObjectId($entryId);
     $batchJob->setObjectType(BatchJobObjectType::ENTRY);
     $batchJob->setStatus(BatchJob::BATCHJOB_STATUS_DONT_PROCESS);
     $batchJob = kJobsManager::addJob($batchJob, $jobData, $jobType, $eventNotificationType);
     $jobData->setJobId($batchJob->getId());
     $batchJob->setData($jobData);
     return kJobsManager::updateBatchJob($batchJob, BatchJob::BATCHJOB_STATUS_PENDING);
 }
開發者ID:DBezemer,項目名稱:server,代碼行數:31,代碼來源:BatchEventNotificationTemplate.php

示例7: addintegrationJob

 public static function addintegrationJob($objectType, $objectId, kIntegrationJobData $data)
 {
     $partnerId = kCurrentContext::getCurrentPartnerId();
     $providerType = $data->getProviderType();
     $integrationProvider = KalturaPluginManager::loadObject('IIntegrationProvider', $providerType);
     if (!$integrationProvider || !$integrationProvider->validatePermissions($partnerId)) {
         KalturaLog::err("partner {$partnerId} not permitted with provider type {$providerType}");
         return false;
     }
     $batchJob = new BatchJob();
     $batchJob->setPartnerId($partnerId);
     $batchJob->setObjectType($objectType);
     $batchJob->setObjectId($objectId);
     if ($objectType == BatchJobObjectType::ENTRY) {
         $batchJob->setEntryId($objectId);
     } elseif ($objectType == BatchJobObjectType::ASSET) {
         $asset = assetPeer::retrieveById($objectId);
         if ($asset) {
             $batchJob->setEntryId($asset->getEntryId());
         }
     }
     $batchJob->setStatus(BatchJob::BATCHJOB_STATUS_DONT_PROCESS);
     $jobType = IntegrationPlugin::getBatchJobTypeCoreValue(IntegrationBatchJobType::INTEGRATION);
     $batchJob = kJobsManager::addJob($batchJob, $data, $jobType, $providerType);
     if ($integrationProvider->shouldSendCallBack()) {
         $jobId = $batchJob->getId();
         $ks = self::generateKs($partnerId, $jobId);
         $callBackUrl = "http://" . kConf::get('cdn_api_host');
         $callBackUrl .= "/api_v3/index.php/service/integration_integration/action/notify";
         $callBackUrl .= "/id/{$jobId}/ks/{$ks}";
         $data = $batchJob->getData();
         $data->setCallbackNotificationUrl($callBackUrl);
         $batchJob->setData($data);
     }
     return kJobsManager::updateBatchJob($batchJob, BatchJob::BATCHJOB_STATUS_PENDING);
 }
開發者ID:DBezemer,項目名稱:server,代碼行數:36,代碼來源:kIntegrationFlowManager.php

示例8: addDropFolderContentProcessorJob

 private function addDropFolderContentProcessorJob(DropFolder $folder, DropFolderFile $dropFolderFileForObject, $dropFolderFileIds)
 {
     $batchJobType = DropFolderPlugin::getCoreValue('BatchJobType', DropFolderBatchType::DROP_FOLDER_CONTENT_PROCESSOR);
     $batchJob = new BatchJob();
     $batchJob->setPartnerId($folder->getPartnerId());
     $batchJob->setObjectId($dropFolderFileForObject->getId());
     $batchJob->setObjectType(DropFolderPlugin::getCoreValue('BatchJobObjectType', DropFolderBatchJobObjectType::DROP_FOLDER_FILE));
     $jobData = kDropFolderContentProcessorJobData::getInstance($folder->getType());
     //Required for plugins which require data to be set on the created entry from the drop folder files.
     $jobData->setData($folder, $dropFolderFileForObject, $dropFolderFileIds);
     return kJobsManager::addJob($batchJob, $jobData, $batchJobType, $folder->getType());
 }
開發者ID:DBezemer,項目名稱:server,代碼行數:12,代碼來源:kDropFolderEventsConsumer.php

示例9: addBulkUploadJob

 /**
  * Function adds bulk upload job to the queue
  * @param Partner $partner
  * @param kBulkUploadJobData $jobData
  * @param string $bulkUploadType
  * @throws APIException
  * @return BatchJob
  */
 public static function addBulkUploadJob(Partner $partner, kBulkUploadJobData $jobData, $bulkUploadType = null, $objectId = null, $objectType = null)
 {
     KalturaLog::debug("adding BulkUpload job");
     $job = new BatchJob();
     $job->setPartnerId($partner->getId());
     $job->setJobType(BatchJobType::BULKUPLOAD);
     $job->setJobSubType($bulkUploadType);
     if (!is_null($objectId) && !is_null($objectType)) {
         $job->setObjectId($objectId);
         $job->setObjectType($objectType);
     }
     if (is_null($jobData)) {
         throw new APIException(APIErrors::BULK_UPLOAD_BULK_UPLOAD_TYPE_NOT_VALID, $bulkUploadType);
     }
     $job->setStatus(BatchJob::BATCHJOB_STATUS_DONT_PROCESS);
     $job = kJobsManager::addJob($job, $jobData, BatchJobType::BULKUPLOAD, $bulkUploadType);
     if (!is_null($jobData->getFilePath())) {
         $syncKey = $job->getSyncKey(BatchJob::FILE_SYNC_BATCHJOB_SUB_TYPE_BULKUPLOAD);
         //		kFileSyncUtils::file_put_contents($syncKey, file_get_contents($csvFileData["tmp_name"]));
         try {
             kFileSyncUtils::moveFromFile($jobData->getFilePath(), $syncKey, true);
         } catch (Exception $e) {
             KalturaLog::err($e);
             throw new APIException(APIErrors::BULK_UPLOAD_CREATE_CSV_FILE_SYNC_ERROR);
         }
         $filePath = kFileSyncUtils::getLocalFilePathForKey($syncKey);
         $jobData->setFilePath($filePath);
     }
     if (!$jobData->getBulkUploadObjectType()) {
         $jobData->setBulkUploadObjectType(BulkUploadObjectType::ENTRY);
     }
     if ($jobData->getBulkUploadObjectType() == BulkUploadObjectType::ENTRY && !$jobData->getObjectData()->getConversionProfileId()) {
         $jobData->setConversionProfileId($partner->getDefaultConversionProfileId());
         $kmcVersion = $partner->getKmcVersion();
         $check = null;
         if ($kmcVersion < 2) {
             $check = ConversionProfilePeer::retrieveByPK($jobData->getConversionProfileId());
         } else {
             $check = conversionProfile2Peer::retrieveByPK($jobData->getConversionProfileId());
         }
         if (!$check) {
             throw new APIException(APIErrors::CONVERSION_PROFILE_ID_NOT_FOUND, $jobData->getConversionProfileId());
         }
     }
     $job->setData($jobData);
     return kJobsManager::updateBatchJob($job, BatchJob::BATCHJOB_STATUS_PENDING);
 }
開發者ID:ace3535,項目名稱:server,代碼行數:55,代碼來源:kJobsManager.php

示例10: addWidevineRepositoryModifySyncJob

 private function addWidevineRepositoryModifySyncJob($entryId, $partnerId, array $flavorAssets, $entryStartDate, $entryEndDate, $monitorSyncCompletion = true)
 {
     KalturaLog::debug('adding  WidevineRepositorySync job, mode = MODIFY');
     $batchJobType = WidevinePlugin::getCoreValue('BatchJobType', WidevineBatchJobType::WIDEVINE_REPOSITORY_SYNC);
     $batchJob = new BatchJob();
     $batchJob->setPartnerId($partnerId);
     $batchJob->setObjectId($entryId);
     $batchJob->setObjectType(BatchJobObjectType::ENTRY);
     $batchJob->setEntryId($entryId);
     $jobData = new kWidevineRepositorySyncJobData();
     $jobData->setSyncMode(WidevineRepositorySyncMode::MODIFY);
     $jobData->setMonitorSyncCompletion($monitorSyncCompletion);
     $wvAssetIds = array();
     foreach ($flavorAssets as $flavorAsset) {
         /* @var $flavorAsset WidevineFlavorAsset */
         if ($flavorAsset->getWidevineAssetId()) {
             $wvAssetIds[] = $flavorAsset->getWidevineAssetId();
         }
     }
     if (!count($wvAssetIds)) {
         KalturaLog::debug("No valid WV assets found, Widevine Sync job is not created");
         return;
     }
     $jobData->setWvAssetIds(implode(',', $wvAssetIds));
     $jobData->addModifiedAttribute('licenseStartDate', $entryStartDate);
     $jobData->addModifiedAttribute('licenseEndDate', $entryEndDate);
     return kJobsManager::addJob($batchJob, $jobData, $batchJobType);
 }
開發者ID:kubrickfr,項目名稱:server,代碼行數:28,代碼來源:kWidevineEventsConsumer.php

示例11: addTransformMetadataJob

 /**
  * @param int $metadataProfileId
  * @param int $srcVersion
  * @param int $destVersion
  * @param string $xsl
  *
  * @return BatchJob
  */
 private static function addTransformMetadataJob($partnerId, $metadataProfileId, $srcVersion, $destVersion, $xsl = null)
 {
     // check if any metadata objects require the transform
     $c = new Criteria();
     $c->add(MetadataPeer::METADATA_PROFILE_ID, $metadataProfileId);
     $c->add(MetadataPeer::METADATA_PROFILE_VERSION, $destVersion, Criteria::LESS_THAN);
     $c->add(MetadataPeer::STATUS, Metadata::STATUS_VALID);
     $metadataCount = MetadataPeer::doCount($c);
     if (!$metadataCount) {
         return null;
     }
     $job = new BatchJob();
     $job->setJobType(BatchJobType::METADATA_TRANSFORM);
     $job->setPartnerId($partnerId);
     $job->setObjectId($metadataProfileId);
     $job->setObjectType(kPluginableEnumsManager::apiToCore('BatchJobObjectType', MetadataBatchJobObjectType::METADATA_PROFILE));
     $data = new kTransformMetadataJobData();
     if ($xsl) {
         $job->save();
         $key = $job->getSyncKey(BatchJob::FILE_SYNC_BATCHJOB_SUB_TYPE_CONFIG);
         kFileSyncUtils::file_put_contents($key, $xsl);
         $xslPath = kFileSyncUtils::getLocalFilePathForKey($key);
         $data->setSrcXslPath($xslPath);
     }
     $data->setMetadataProfileId($metadataProfileId);
     $data->setSrcVersion($srcVersion);
     $data->setDestVersion($destVersion);
     return kJobsManager::addJob($job, $data, BatchJobType::METADATA_TRANSFORM);
 }
開發者ID:AdiTal,項目名稱:server,代碼行數:37,代碼來源:kMetadataManager.php

示例12: addParseCaptionAssetJob

 /**
  * @param CaptionAsset $captionAsset
  * @param BatchJob $parentJob
  * @throws kCoreException FILE_NOT_FOUND
  * @return BatchJob
  */
 public function addParseCaptionAssetJob(CaptionAsset $captionAsset, BatchJob $parentJob = null)
 {
     $syncKey = $captionAsset->getSyncKey(asset::FILE_SYNC_ASSET_SUB_TYPE_ASSET);
     $fileSync = kFileSyncUtils::getReadyInternalFileSyncForKey($syncKey);
     if (!$fileSync) {
         if (!PermissionPeer::isValidForPartner(CaptionPermissionName::IMPORT_REMOTE_CAPTION_FOR_INDEXING, $captionAsset->getPartnerId())) {
             throw new kCoreException("File sync not found: {$syncKey}", kCoreException::FILE_NOT_FOUND);
         }
         $fileSync = kFileSyncUtils::getReadyExternalFileSyncForKey($syncKey);
         if (!$fileSync) {
             throw new kCoreException("File sync not found: {$syncKey}", kCoreException::FILE_NOT_FOUND);
         }
         $fullPath = myContentStorage::getFSUploadsPath() . '/' . $captionAsset->getId() . '.tmp';
         if (!KCurlWrapper::getDataFromFile($fileSync->getExternalUrl($captionAsset->getEntryId()), $fullPath)) {
             throw new kCoreException("File sync not found: {$syncKey}", kCoreException::FILE_NOT_FOUND);
         }
         kFileSyncUtils::moveFromFile($fullPath, $syncKey, true, false, true);
     }
     $jobData = new kParseCaptionAssetJobData();
     $jobData->setCaptionAssetId($captionAsset->getId());
     $batchJobType = CaptionSearchPlugin::getBatchJobTypeCoreValue(CaptionSearchBatchJobType::PARSE_CAPTION_ASSET);
     $batchJob = null;
     if ($parentJob) {
         $batchJob = $parentJob->createChild($batchJobType);
     } else {
         $batchJob = new BatchJob();
         $batchJob->setEntryId($captionAsset->getEntryId());
         $batchJob->setPartnerId($captionAsset->getPartnerId());
     }
     $batchJob->setObjectId($captionAsset->getId());
     $batchJob->setObjectType(BatchJobObjectType::ASSET);
     return kJobsManager::addJob($batchJob, $jobData, $batchJobType);
 }
開發者ID:DBezemer,項目名稱:server,代碼行數:39,代碼來源:kCaptionSearchFlowManager.php

示例13: addSubmitDeleteJob

 /**
  * @param EntryDistribution $entryDistribution
  * @param DistributionProfile $distributionProfile
  * @return BatchJob
  */
 protected static function addSubmitDeleteJob(EntryDistribution $entryDistribution, DistributionProfile $distributionProfile)
 {
     $entryDistribution->setStatus(EntryDistributionStatus::DELETING);
     if (!$entryDistribution->save()) {
         KalturaLog::err("Unable to save entry distribution [" . $entryDistribution->getId() . "] status");
         $entryDistribution->reload();
         return null;
     }
     $entryDistribution->setDirtyStatus(null);
     //Moved down to ensure previous save is done Atomically
     $entryDistribution->save();
     $jobData = new kDistributionDeleteJobData();
     $jobData->setDistributionProfileId($entryDistribution->getDistributionProfileId());
     $jobData->setEntryDistributionId($entryDistribution->getId());
     $jobData->setProviderType($distributionProfile->getProviderType());
     $jobData->setRemoteId($entryDistribution->getRemoteId());
     $jobData->setMediaFiles($entryDistribution->getMediaFiles());
     $batchJob = new BatchJob();
     $batchJob->setEntryId($entryDistribution->getEntryId());
     $batchJob->setPartnerId($entryDistribution->getPartnerId());
     $batchJob->setObjectId($entryDistribution->getId());
     $batchJob->setObjectType(kPluginableEnumsManager::apiToCore('BatchJobObjectType', ContentDistributionBatchJobObjectType::ENTRY_DISTRIBUTION));
     $jobType = ContentDistributionPlugin::getBatchJobTypeCoreValue(ContentDistributionBatchJobType::DISTRIBUTION_DELETE);
     $jobSubType = $distributionProfile->getProviderType();
     return kJobsManager::addJob($batchJob, $jobData, $jobType, $jobSubType);
 }
開發者ID:DBezemer,項目名稱:server,代碼行數:31,代碼來源:kContentDistributionManager.php

示例14: addReIndexTagsJob

 /**
  * @param int $categoryId
  * @param string $pcToDecrement
  * @param string $pcToIncrement
  * @return BatchJob
  */
 protected static function addReIndexTagsJob($categoryId, $pcToDecrement, $pcToIncrement, $partnerId = null)
 {
     $jobType = TagSearchPlugin::getBatchJobTypeCoreValue(IndexTagsByPrivacyContextJobType::INDEX_TAGS);
     $data = new kIndexTagsByPrivacyContextJobData();
     $data->setChangedCategoryId($categoryId);
     $data->setDeletedPrivacyContexts($pcToDecrement);
     $data->setAddedPrivacyContexts($pcToIncrement);
     $batchJob = new BatchJob();
     $batchJob->setObjectId($categoryId);
     $batchJob->setObjectType(BatchJobObjectType::CATEGORY);
     if (!$partnerId) {
         $partnerId = kCurrentContext::getCurrentPartnerId();
     }
     $batchJob->setPartnerId($partnerId);
     KalturaLog::log("Creating tag re-index job for categoryId [" . $data->getChangedCategoryId() . "] ");
     return kJobsManager::addJob($batchJob, $data, $jobType);
 }
開發者ID:DBezemer,項目名稱:server,代碼行數:23,代碼來源:kTagFlowManager.php

示例15: createScheduledTaskJob

 /**
  * @param ScheduledTaskProfile $scheduledTaskProfile
  * @param kScheduledTaskJobData $jobData
  * @return BatchJob
  */
 protected function createScheduledTaskJob(ScheduledTaskProfile $scheduledTaskProfile, kScheduledTaskJobData $jobData)
 {
     $scheduledTaskProfileId = $scheduledTaskProfile->getId();
     $jobType = ScheduledTaskPlugin::getBatchJobTypeCoreValue(ScheduledTaskBatchType::SCHEDULED_TASK);
     $objectType = ScheduledTaskPlugin::getBatchJobObjectTypeCoreValue(ScheduledTaskBatchJobObjectType::SCHEDULED_TASK_PROFILE);
     KalturaLog::log("Creating scheduled task dry run job for profile [" . $scheduledTaskProfileId . "]");
     $batchJob = new BatchJob();
     $batchJob->setPartnerId($scheduledTaskProfile->getPartnerId());
     $batchJob->setObjectId($scheduledTaskProfileId);
     $batchJob->setObjectType($objectType);
     $batchJob->setStatus(BatchJob::BATCHJOB_STATUS_PENDING);
     $batchJob = kJobsManager::addJob($batchJob, $jobData, $jobType);
     return $batchJob;
 }
開發者ID:DBezemer,項目名稱:server,代碼行數:19,代碼來源:ScheduledTaskProfileService.php


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