本文整理匯總了PHP中StorageProfilePeer::retrieveAutomaticByPartnerId方法的典型用法代碼示例。如果您正苦於以下問題:PHP StorageProfilePeer::retrieveAutomaticByPartnerId方法的具體用法?PHP StorageProfilePeer::retrieveAutomaticByPartnerId怎麽用?PHP StorageProfilePeer::retrieveAutomaticByPartnerId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類StorageProfilePeer
的用法示例。
在下文中一共展示了StorageProfilePeer::retrieveAutomaticByPartnerId方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: exportSourceAssetFromJob
public static function exportSourceAssetFromJob(BatchJob $dbBatchJob)
{
// convert collection finished - export ism and ismc files
if ($dbBatchJob->getJobType() == BatchJobType::CONVERT_COLLECTION && $dbBatchJob->getJobSubType() == conversionEngineType::EXPRESSION_ENCODER3) {
$entry = $dbBatchJob->getEntry();
$externalStorages = StorageProfilePeer::retrieveAutomaticByPartnerId($dbBatchJob->getPartnerId());
foreach ($externalStorages as $externalStorage) {
if ($externalStorage->triggerFitsReadyAsset($entry->getId())) {
$ismKey = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_ISM);
if (kFileSyncUtils::fileSync_exists($ismKey)) {
self::export($entry, $externalStorage, $ismKey);
}
$ismcKey = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_ISMC);
if (kFileSyncUtils::fileSync_exists($ismcKey)) {
self::export($entry, $externalStorage, $ismcKey);
}
}
}
}
return true;
}
示例2: exportSourceAssetFromJob
public static function exportSourceAssetFromJob(BatchJob $dbBatchJob)
{
// convert profile finished - export source flavor
if ($dbBatchJob->getJobType() == BatchJobType::CONVERT_PROFILE) {
$externalStorages = StorageProfilePeer::retrieveAutomaticByPartnerId($dbBatchJob->getPartnerId());
$sourceFlavor = assetPeer::retrieveOriginalByEntryId($dbBatchJob->getEntryId());
if (!$sourceFlavor) {
KalturaLog::debug('Cannot find source flavor for entry id [' . $dbBatchJob->getEntryId() . ']');
} else {
if (!$sourceFlavor->isLocalReadyStatus()) {
KalturaLog::debug('Source flavor id [' . $sourceFlavor->getId() . '] has status [' . $sourceFlavor->getStatus() . '] - not ready for export');
} else {
foreach ($externalStorages as $externalStorage) {
if ($externalStorage->triggerFitsReadyAsset($dbBatchJob->getEntryId())) {
self::exportFlavorAsset($sourceFlavor, $externalStorage);
}
}
}
}
}
// convert collection finished - export ism and ismc files
if ($dbBatchJob->getJobType() == BatchJobType::CONVERT_COLLECTION && $dbBatchJob->getJobSubType() == conversionEngineType::EXPRESSION_ENCODER3) {
$entry = $dbBatchJob->getEntry();
$externalStorages = StorageProfilePeer::retrieveAutomaticByPartnerId($dbBatchJob->getPartnerId());
foreach ($externalStorages as $externalStorage) {
if ($externalStorage->triggerFitsReadyAsset($entry->getId())) {
$ismKey = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_ISM);
if (kFileSyncUtils::fileSync_exists($ismKey)) {
self::export($entry, $externalStorage, $ismKey);
}
$ismcKey = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_ISMC);
if (kFileSyncUtils::fileSync_exists($ismcKey)) {
self::export($entry, $externalStorage, $ismcKey);
}
}
}
}
return true;
}
示例3: updatedJob
/**
* @param BatchJob $dbBatchJob
* @param BatchJob $twinJob
* @return bool true if should continue to the next consumer
*/
public function updatedJob(BatchJob $dbBatchJob, BatchJob $twinJob = null)
{
if ($dbBatchJob->getStatus() != BatchJob::BATCHJOB_STATUS_FINISHED) {
return true;
}
// convert profile finished - export source flavor
if ($dbBatchJob->getJobType() == BatchJobType::CONVERT_PROFILE) {
$externalStorages = StorageProfilePeer::retrieveAutomaticByPartnerId($dbBatchJob->getPartnerId());
foreach ($externalStorages as $externalStorage) {
if ($externalStorage->getTrigger() == StorageProfile::STORAGE_TEMP_TRIGGER_FLAVOR_READY || $externalStorage->getTrigger() == StorageProfile::STORAGE_TEMP_TRIGGER_MODERATION_APPROVED && $dbBatchJob->getEntry()->getModerationStatus() == entry::ENTRY_MODERATION_STATUS_APPROVED) {
$sourceFlavor = flavorAssetPeer::retrieveOriginalReadyByEntryId($dbBatchJob->getEntryId());
if ($sourceFlavor) {
$this->exportFlavorAsset($sourceFlavor, $externalStorage);
}
}
}
}
// convert collection finished - export ism and ismc files
if ($dbBatchJob->getJobType() == BatchJobType::CONVERT_COLLECTION && $dbBatchJob->getJobSubType() == conversionEngineType::EXPRESSION_ENCODER3) {
$entry = $dbBatchJob->getEntry();
$externalStorages = StorageProfilePeer::retrieveAutomaticByPartnerId($dbBatchJob->getPartnerId());
foreach ($externalStorages as $externalStorage) {
if ($externalStorage->getTrigger() == StorageProfile::STORAGE_TEMP_TRIGGER_FLAVOR_READY || $externalStorage->getTrigger() == StorageProfile::STORAGE_TEMP_TRIGGER_MODERATION_APPROVED && $entry->getModerationStatus() == entry::ENTRY_MODERATION_STATUS_APPROVED) {
$ismKey = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_ISM);
if (kFileSyncUtils::fileSync_exists($ismKey)) {
$this->export($entry, $externalStorage, $ismKey);
}
$ismcKey = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_ISMC);
if (kFileSyncUtils::fileSync_exists($ismcKey)) {
$this->export($entry, $externalStorage, $ismcKey);
}
}
}
}
return true;
}