Skip to content

Commit 89f3415

Browse files
authored
Docker: Add more logs to video container (#2783)
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent cb78635 commit 89f3415

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Video/video.sh

+11
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ if [ "${SE_VIDEO_RECORD_STANDALONE}" = "true" ]; then
2525
JQ_SESSION_ID_QUERY=".value.nodes[]?.slots[]?.session?.sessionId"
2626
SE_NODE_PORT=${SE_NODE_PORT:-"4444"}
2727
NODE_STATUS_ENDPOINT="$(python3 /opt/bin/video_gridUrl.py)/status"
28+
NODE_OWNER_ENDPOINT="$(python3 /opt/bin/video_gridUrl.py)/se/grid/node/owner"
2829
else
2930
JQ_SESSION_ID_QUERY=".[]?.node?.slots | .[0]?.session?.sessionId"
3031
SE_NODE_PORT=${SE_NODE_PORT:-"5555"}
3132
NODE_STATUS_ENDPOINT="${SE_SERVER_PROTOCOL}://${DISPLAY_CONTAINER_NAME}:${SE_NODE_PORT}/status"
33+
NODE_OWNER_ENDPOINT="${SE_SERVER_PROTOCOL}://${DISPLAY_CONTAINER_NAME}:${SE_NODE_PORT}/se/grid/node/owner"
3234
fi
3335

3436
/opt/bin/validate_endpoint.sh "${NODE_STATUS_ENDPOINT}"
@@ -37,6 +39,13 @@ if [ -n "${SE_ROUTER_USERNAME}" ] && [ -n "${SE_ROUTER_PASSWORD}" ]; then
3739
BASIC_AUTH="Authorization: Basic ${BASIC_AUTH}"
3840
fi
3941

42+
# Set headers if Node Registration Secret is set
43+
if [ ! -z "${SE_REGISTRATION_SECRET}" ]; then
44+
HEADERS="X-REGISTRATION-SECRET: ${SE_REGISTRATION_SECRET}"
45+
else
46+
HEADERS="X-REGISTRATION-SECRET;"
47+
fi
48+
4049
if [ -d "${VIDEO_FOLDER}" ]; then
4150
echo "$(date -u +"${ts_format}") [${process_name}] - Video folder exists: ${VIDEO_FOLDER}"
4251
else
@@ -93,6 +102,7 @@ function wait_for_api_respond() {
93102
until check_if_api_respond; do
94103
sleep ${poll_interval}
95104
done
105+
echo "$(date -u +"${ts_format}") [${process_name}] - Node endpoint is responding now. Proceeding next steps..."
96106
return 0
97107
}
98108

@@ -276,4 +286,5 @@ else
276286
done
277287
stop_if_recording_inprogress
278288
echo "$(date -u +"${ts_format}") [${process_name}] - Node API is not responding now, exiting..."
289+
echo "$(date -u +"${ts_format}") [${process_name}] - Noted: Set container restart policy to spin up process again for recording another session might come up"
279290
fi

0 commit comments

Comments
 (0)