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


PHP BatchJob::getMessage方法代码示例

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


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

示例1: onDistributionDeleteJobFailed

 /**
  * @param BatchJob $dbBatchJob
  * @param kDistributionDeleteJobData $data
  * @param BatchJob $twinJob
  * @return BatchJob
  */
 public static function onDistributionDeleteJobFailed(BatchJob $dbBatchJob, kDistributionDeleteJobData $data, BatchJob $twinJob = null)
 {
     $entryDistribution = EntryDistributionPeer::retrieveByPK($data->getEntryDistributionId());
     if (!$entryDistribution) {
         KalturaLog::err("Entry distribution [" . $data->getEntryDistributionId() . "] not found");
         return $dbBatchJob;
     }
     $entryDistribution->setErrorType($dbBatchJob->getErrType());
     $entryDistribution->setErrorNumber($dbBatchJob->getErrNumber());
     $entryDistribution->setErrorDescription($dbBatchJob->getMessage());
     $entryDistribution->setStatus(EntryDistributionStatus::ERROR_DELETING);
     $entryDistribution->setDirtyStatus(null);
     $entryDistribution->save();
     return $dbBatchJob;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:21,代码来源:kContentDistributionFlowManager.php

示例2: 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

示例3: preBatchJobUpdate

 public static function preBatchJobUpdate(BatchJob $batchJob)
 {
     if ($batchJob->isColumnModified(BatchJobPeer::ERR_NUMBER) || $batchJob->isColumnModified(BatchJobPeer::ERR_TYPE) || $batchJob->isColumnModified(BatchJobPeer::MESSAGE)) {
         $historyRecord = new kBatchHistoryData();
         $historyRecord->setErrNumber($batchJob->getErrNumber());
         $historyRecord->setErrType($batchJob->getErrType());
         $historyRecord->setMessage($batchJob->getMessage());
         $batchJob->addHistoryRecord($historyRecord);
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:10,代码来源:BatchJobPeer.php


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