当前位置: 首页>>代码示例>>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;未经允许,请勿转载。