private function pollConverted($write_to_log = true) { list($full_conv_res_path, $file_name, $in_proc) = $this->getFileFromConvertion($write_to_log); if (!$full_conv_res_path) { return; } $entry_id = self::getEntryIdFromFileName($file_name); KalturaLog::debug("Updating entry [" . $entry_id . "]"); entryPeer::setUseCriteriaFilter(false); // update the entry even if it's deleted // $c = new Criteria(); // $c->add(entryPeer::ID, $entry_id); // $entry = entryPeer::doSelectOne( $c ); $entry = entryPeer::retrieveByPK($entry_id); // fetch file from the conversion server and store it in the correct place - content/entry/data/... // using the ame logic as in contribute/insertEntryAction & myContentStorage... $this->removeInProc($in_proc); if ($entry == NULL) { // TODO - entry does not exist in DB - what to do ? // move file to some directory return; } // the target of the entry was already set at time of sentToCenversion $conv_res = kConversionResult::fromFile($full_conv_res_path); KalturaLog::debug(print_r($conv_res, true)); // sleep a while for synching data on the disk sleep(3); $this->markFileSyncAsReady($entry); $this->updateConvertedEntry($conv_res->status_ok, $entry, $conv_res); // flag a success to break the row of faliures (is any) self::succeeded(); }