Esempio n. 1
0
 public static function handleConvertProfileFinished(BatchJob $dbBatchJob, kConvertProfileJobData $data)
 {
     self::deleteTemporaryFlavors($dbBatchJob->getEntryId());
     self::handleLocalFileSyncDeletion($dbBatchJob->getEntryId(), $dbBatchJob->getPartner());
     kFlowHelper::generateThumbnailsFromFlavor($dbBatchJob->getEntryId(), $dbBatchJob);
     $entry = $dbBatchJob->getEntry();
     if ($entry) {
         kBusinessConvertDL::checkForPendingLiveClips($entry);
         $clonePendingEntriesArray = $entry->getClonePendingEntries();
         foreach ($clonePendingEntriesArray as $pendingEntryId) {
             $pendingEntry = entryPeer::retrieveByPK($pendingEntryId);
             if ($pendingEntry) {
                 myEntryUtils::copyEntryData($entry, $pendingEntry);
                 $pendingEntry->setStatus($entry->getStatus());
                 $pendingEntry->setLengthInMsecs($entry->getLengthInMsecs());
                 $pendingEntry->save();
             }
         }
         $entry->setClonePendingEntries(array());
         $entry->save();
     }
     return $dbBatchJob;
 }