Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Jun 7, 2024
1 parent 1fe3cb4 commit 5e8e120
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions objects/Encoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -906,11 +906,16 @@ public function isWorkerRunning()

private static function setStatusError($queue_id, $msg, $notifyIsDone = false)
{
global $global;
error_log("setStatusError($queue_id, $msg, $notifyIsDone) " . json_encode(debug_backtrace()));
$q = new Encoder($queue_id);
$q->setStatus(Encoder::$STATUS_ERROR);
$q->setStatus_obs($msg);
$saved = $q->save();

if (file_exists($global['docker_vars'])) {
file_put_contents($global['systemRootPath'] . 'videos/aVideoEncoder.log', $msg . ' '. json_encode(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)));
}
if (!empty($notifyIsDone)) {
$q->notifyVideoIsDone(1);
}
Expand Down Expand Up @@ -2590,9 +2595,6 @@ public static function setStreamerLog($encoder_queue_id, $msg, $type)
'type' => $type,
'videos_id' => $return_vars->videos_id,
);
if (file_exists($global['docker_vars'])) {
file_put_contents($global['systemRootPath'] . 'videos/aVideoEncoder.log', json_encode(array($postFields, debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS))));
}
return self::sendToStreamer($target, $postFields, $return_vars, $encoder);
}
}
Expand Down

0 comments on commit 5e8e120

Please sign in to comment.