本文整理汇总了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;
}