Skip to content

Commit 3c1bd49

Browse files
committed
Update func in video recording
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent 4c35f64 commit 3c1bd49

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Video/video.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ function wait_for_file_integrity() {
182182
function stop_if_recording_inprogress() {
183183
if [[ "$recording_started" = "true" ]] || check_if_ffmpeg_running; then
184184
stop_recording
185-
wait_for_file_integrity
186185
fi
187186
}
188187

@@ -223,7 +222,6 @@ if [[ "${VIDEO_UPLOAD_ENABLED}" != "true" ]] && [[ "${VIDEO_FILE_NAME}" != "auto
223222
if ps -p $FFMPEG_PID >/dev/null; then
224223
wait $FFMPEG_PID
225224
fi
226-
wait_for_file_integrity
227225

228226
else
229227
trap graceful_exit_force SIGTERM SIGINT EXIT
@@ -239,7 +237,7 @@ else
239237

240238
wait_for_api_respond
241239
while curl --noproxy "*" -H "Authorization: Basic ${BASIC_AUTH}" -sk --request GET ${NODE_STATUS_ENDPOINT} >/tmp/status.json; do
242-
session_id=$(jq -r "${JQ_SESSION_ID_QUERY}" /tmp/status.json)
240+
session_id=$(jq -e "${JQ_SESSION_ID_QUERY}" /tmp/status.json || echo "null")
243241
if [[ "$session_id" != "null" && "$session_id" != "" && "$session_id" != "reserved" && "$recording_started" = "false" ]]; then
244242
echo "$(date -u +"${ts_format}") [${process_name}] - Session: $session_id is created"
245243
return_list=($(bash ${VIDEO_CONFIG_DIRECTORY}/video_graphQLQuery.sh "$session_id"))
@@ -263,7 +261,6 @@ else
263261
sleep ${poll_interval}
264262
elif [[ "$session_id" != "$prev_session_id" && "$recording_started" = "true" ]]; then
265263
stop_recording
266-
wait_for_file_integrity
267264
if [[ $max_recorded_count -gt 0 ]] && [[ $recorded_count -ge $max_recorded_count ]]; then
268265
echo "$(date -u +"${ts_format}") [${process_name}] - Node will be drained since max sessions reached count number ($max_recorded_count)"
269266
exit

0 commit comments

Comments
 (0)