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