From 5e8e120150057546dc6e3ed623000fa71e30ec7f Mon Sep 17 00:00:00 2001 From: Daniel Neto Date: Thu, 6 Jun 2024 23:44:52 -0300 Subject: [PATCH] Update --- objects/Encoder.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/objects/Encoder.php b/objects/Encoder.php index bb42c918..3b5c0231 100644 --- a/objects/Encoder.php +++ b/objects/Encoder.php @@ -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); } @@ -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); } }