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


PHP kFileSyncUtils::createPendingExternalSyncFileForKey方法代碼示例

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


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

示例1: export

 /**
  * @param entry $entry
  * @param FileSyncKey $key
  */
 protected function export(entry $entry, StorageProfile $externalStorage, FileSyncKey $key, $force = false)
 {
     if (!$this->shouldExport($key, $externalStorage)) {
         KalturaLog::log(__METHOD__ . " no need to export key [{$key}] to externalStorage id[" . $externalStorage->getId() . "]");
         return;
     }
     $fileSync = kFileSyncUtils::createPendingExternalSyncFileForKey($key, $externalStorage);
     $srcFileSyncLocalPath = kFileSyncUtils::getLocalFilePathForKey($key, true);
     kJobsManager::addStorageExportJob(null, $entry->getId(), $entry->getPartnerId(), $externalStorage, $fileSync, $srcFileSyncLocalPath, $force);
 }
開發者ID:richhl,項目名稱:kalturaCE,代碼行數:14,代碼來源:kStorageExporter.php

示例2: export

 /**
  * @param entry $entry
  * @param FileSyncKey $key
  */
 protected static function export(entry $entry, StorageProfile $externalStorage, FileSyncKey $key, $force = false)
 {
     /* @var $fileSync FileSync */
     list($fileSync, $local) = kFileSyncUtils::getReadyFileSyncForKey($key, true, false);
     if (!$fileSync || $fileSync->getFileType() == FileSync::FILE_SYNC_FILE_TYPE_URL) {
         KalturaLog::info("no ready fileSync was found for key [{$key}]");
         return;
     }
     $externalFileSync = kFileSyncUtils::createPendingExternalSyncFileForKey($key, $externalStorage, $fileSync->getIsDir());
     $parent_file_sync = kFileSyncUtils::resolve($fileSync);
     $srcFileSyncPath = $parent_file_sync->getFileRoot() . $parent_file_sync->getFilePath();
     kJobsManager::addStorageExportJob(null, $entry->getId(), $entry->getPartnerId(), $externalStorage, $externalFileSync, $srcFileSyncPath, $force, $fileSync->getDc());
     return true;
 }
開發者ID:DBezemer,項目名稱:server,代碼行數:18,代碼來源:kStorageExporter.php

示例3: unset

             continue;
         }
         if (kFileSyncUtils::getReadyExternalFileSyncForKey($key, $storageProfileId)) {
             unset($keys[$index]);
         }
         if (!kFileSyncUtils::getReadyInternalFileSyncForKey($key)) {
             echo 'file sync key does not have an internal file -' . serialize($key) . PHP_EOL;
             unset($keys[$index]);
         }
     }
     if (!count($keys)) {
         echo $entry->getId() . " - has no keys to export\n";
         continue;
     }
     foreach ($keys as $key) {
         $fileSync = kFileSyncUtils::createPendingExternalSyncFileForKey($key, $storageProfile);
         $dcFileSync = kFileSyncUtils::getReadyInternalFileSyncForKey($key);
         /* @var $dcFileSync FileSync */
         $srcFileSyncLocalPath = $dcFileSync->getFileRoot() . $dcFileSync->getFilePath();
         kJobsManager::addStorageExportJob(null, $entry->getId(), $partnerId, $storageProfile, $fileSync, $srcFileSyncLocalPath, true, $dcFileSync->getDc());
     }
     echo $entry->getId() . " - " . count($keys) . " keys exported\n\n";
     $totalExported++;
     if ($maxEntriesToExport > 0 && $totalExported >= $maxEntriesToExport) {
         echo 'Max entries limit of [' . $maxEntriesToExport . '] reached - stopping executin';
         $moreEntries = false;
         break;
     }
     usleep(100);
 }
 if (count($entries) < $curLimit) {
開發者ID:DBezemer,項目名稱:server,代碼行數:31,代碼來源:exportToNetStorage.php


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