public static function updateEntry(BatchJob $dbBatchJob, $status) { $entry = $dbBatchJob->getEntry(); if (!$entry) { KalturaLog::debug("Entry was not found for job id [{$dbBatchJob->getId}()]"); return null; } // entry status didn't change - no need to send notification if ($entry->getStatus() == $status) { return $entry; } // backward compatibility // if entry has kshow, and this is the first entry in the mix, // the thumbnail of the entry should be copied into the mix entry if ($status == entryStatus::READY) { myEntryUtils::createRoughcutThumbnailFromEntry($entry, false); } // entry status is ready and above, not changing status through batch job if ($entry->getStatus() >= entryStatus::READY) { return $entry; } $entry->setStatus($status); $entry->save(); kFlowHelper::createEntryUpdateNotification($dbBatchJob); return $entry; }