当前位置: 首页>>代码示例>>PHP>>正文


PHP BatchJob::getDescription方法代码示例

本文整理汇总了PHP中BatchJob::getDescription方法的典型用法代码示例。如果您正苦于以下问题:PHP BatchJob::getDescription方法的具体用法?PHP BatchJob::getDescription怎么用?PHP BatchJob::getDescription使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BatchJob的用法示例。


在下文中一共展示了BatchJob::getDescription方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: failBatchJob

 public static function failBatchJob(BatchJob $batchJob, $errDescription)
 {
     $batchJob->setMessage($errDescription);
     $description = $batchJob->getDescription() . "\n{$errDescription}";
     $batchJob->setDescription($description);
     return self::updateBatchJob($batchJob, BatchJob::BATCHJOB_STATUS_FAILED);
 }
开发者ID:ace3535,项目名称:server,代码行数:7,代码来源:kJobsManager.php

示例2: finishJobWithError

 /**
  * @param BatchJob $job
  * @param $errorDescription
  * @return BatchJob
  */
 protected function finishJobWithError(BatchJob $job, $errorDescription)
 {
     $job->setStatus(BatchJob::BATCHJOB_STATUS_FAILED);
     $job->setDescription($job->getDescription() . '\\n' . $errorDescription);
     $job->save();
     return $job;
 }
开发者ID:DBezemer,项目名称:server,代码行数:12,代码来源:kScheduledTaskBatchJobFlowManager.php

示例3: handleBulkDownloadPending

 public static function handleBulkDownloadPending(BatchJob $dbBatchJob, kBulkDownloadJobData $data, BatchJob $twinJob = null)
 {
     $entryIds = explode(',', $data->getEntryIds());
     $flavorParamsId = $data->getFlavorParamsId();
     $jobIsFinished = true;
     foreach ($entryIds as $entryId) {
         $entry = entryPeer::retrieveByPK($entryId);
         if (is_null($entry)) {
             KalturaLog::err("Entry id [{$entryId}] not found.");
         } else {
             if ($entry->hasDownloadAsset($flavorParamsId)) {
                 // why we don't send the notification in case of image is ready?
                 $flavorAsset = flavorAssetPeer::retrieveByEntryIdAndFlavorParams($entryId, $flavorParamsId);
                 if ($flavorAsset && $flavorAsset->getStatus() == flavorAsset::FLAVOR_ASSET_STATUS_READY) {
                     $syncKey = $flavorAsset->getSyncKey(flavorAsset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);
                     $downloadUrl = $flavorAsset->getDownloadUrl();
                     $localPath = kFileSyncUtils::getLocalFilePathForKey($syncKey);
                     $downloadUrl = $flavorAsset->getDownloadUrl();
                     $notificationData = array("puserId" => $entry->getPuserId(), "entryId" => $entry->getId(), "entryIntId" => $entry->getIntId(), "entryVersion" => $entry->getVersion(), "fileFormat" => $flavorAsset->getFileExt(), "archivedFile" => $localPath, "downoladPath" => $localPath, "conversionQuality" => $entry->getConversionQuality(), "downloadUrl" => $downloadUrl);
                     $extraData = array("data" => json_encode($notificationData), "partner_id" => $entry->getPartnerId(), "puser_id" => $entry->getPuserId(), "entry_id" => $entry->getId(), "entry_int_id" => $entry->getIntId(), "entry_version" => $entry->getVersion(), "file_format" => $flavorAsset->getFileExt(), "archived_file" => $localPath, "downolad_path" => $localPath, "target" => $localPath, "conversion_quality" => $entry->getConversionQuality(), "download_url" => $downloadUrl, "status" => $entry->getStatus(), "abort" => $dbBatchJob->getAbort(), "progress" => $dbBatchJob->getProgress(), "message" => $dbBatchJob->getMessage(), "description" => $dbBatchJob->getDescription(), "updates_count" => $dbBatchJob->getUpdatesCount(), "job_type" => BatchJobType::DOWNLOAD, "status" => BatchJob::BATCHJOB_STATUS_FINISHED, "progress" => 100, "debug" => __LINE__);
                     myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_BATCH_JOB_SUCCEEDED, $dbBatchJob, $dbBatchJob->getPartnerId(), null, null, $extraData, $entryId);
                 }
             } else {
                 $jobIsFinished = false;
                 $entry->createDownloadAsset($dbBatchJob, $flavorParamsId, $data->getPuserId());
             }
         }
     }
     if ($jobIsFinished) {
         // mark the job as finished
         $dbBatchJob = kJobsManager::updateBatchJob($dbBatchJob, BatchJob::BATCHJOB_STATUS_FINISHED);
     } else {
         // mark the job as almost done
         $dbBatchJob = kJobsManager::updateBatchJob($dbBatchJob, BatchJob::BATCHJOB_STATUS_ALMOST_DONE);
     }
     return $dbBatchJob;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:37,代码来源:kFlowHelper.php


注:本文中的BatchJob::getDescription方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。