New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mercury 13.15.0 plat 8651 chop and slice #6938
Mercury 13.15.0 plat 8651 chop and slice #6938
Conversation
… cuePoint service
This reverts commit 8e75416.
* @param array $dynamicAttributes | ||
* @return bool is clip attribute exist in dynamic attribute | ||
*/ | ||
public static function isClipServiceRequired(array $dynamicAttributes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name is confusing , since you are looking for multi clip service, rename to isMutliClip(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isMultipleClipOperation done
* @param BatchJob $batchJob | ||
* @return bool are all clip batch done | ||
*/ | ||
private function handleClipChildJob($batchJob) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename - handle... function should do something, this one returns true or false. rename to shouldHandle....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
areAllClipJobsDone done
$this->handleClipConcatParentJob($batchJob); | ||
} | ||
|
||
if ($batchJob->getParentJob() && $batchJob->getParentJob()->getJobType() == BatchJobType::CONVERT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible that jobType will b CLIP_CONCAT and also parentJob will be convert?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, CLIP_CONCAT is the root job, it is not born from any job
$flavorAsset->setPartnerId($partnerId); | ||
$flavorAsset->setEntryId($entryId); | ||
$flavorAsset->save(); | ||
$flavorAsset->putInCustomData(self::CLIP_NUMBER,$order); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
save should be done after setting clip number
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
$jobData = $batchJob->getData(); | ||
|
||
$tempEntry = entryPeer::retrieveByPK($jobData->getTempEntryId()); | ||
$assets = assetPeer::retrieveByEntryId($jobData->getTempEntryId()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to limit asset to the only type you know to concat which is flavorAsset
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$assets = assetPeer::retrieveByEntryId($jobData->getTempEntryId(), array(assetType::FLAVOR));
api_v3/lib/KalturaEntryService.php
Outdated
$operationAttributes = $resource->getOperationAttributes(); | ||
$internalResource = $resource->getResource(); | ||
if($internalResource instanceof kLiveEntryResource) | ||
if (kClipManager::isClipServiceRequired($operationAttributes)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename isMulti....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
* @param BaseObject $object | ||
* @return bool | ||
*/ | ||
protected static function getClipConcatFlow( BaseObject $object ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename , this should be isClipConcatFlow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done also in KCuePointMangaer
$pager = new KalturaFilterPager(); | ||
$pager->pageSize = self::MAX_CUE_POINTS_TO_COPY_TO_VOD; | ||
/** @noinspection PhpUndefinedFieldInspection */ | ||
$result = KBatchBase::$kClient->cuePoint->listAction($filter, $pager); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try / catch this call with at list 3 retries.
$cuePointDestEndTime = min($cuePoint->endTime - $clipStartTime + $offsetInDestination, $clipEndTime - $clipStartTime + $offsetInDestination); | ||
} | ||
/** @noinspection PhpUndefinedFieldInspection */ | ||
$clonedCuePoint = KBatchBase::$kClient->cuePoint->cloneAction($cuePoint->id, $destinationEntryId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try/catch action
} | ||
if ($clonedCuePoint) { | ||
/** @noinspection PhpUndefinedFieldInspection */ | ||
$res = $this->updateCuePointTimes($clonedCuePoint, $cuePointDestStartTime,$cuePointDestEndTime); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here - try / catch and retry 3 times. Beside API exception invalid cue point ID.
chop and slice pull request - server.