Skip to content

Commit a64e4ab

Browse files
committed
Docker: Video record extract last session from json response
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent e9c4c3d commit a64e4ab

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Video/video.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ ts_format=${SE_LOG_TIMESTAMP_FORMAT:-"%Y-%m-%d %H:%M:%S,%3N"}
2222
process_name="video.recorder"
2323

2424
if [ "${SE_VIDEO_RECORD_STANDALONE}" = "true" ]; then
25-
JQ_SESSION_ID_QUERY=".value.nodes[]?.slots[]?.session?.sessionId"
25+
JQ_SESSION_ID_QUERY=".value.nodes[-1]?.slots[-1]?.session?.sessionId"
2626
SE_NODE_PORT=${SE_NODE_PORT:-"4444"}
2727
NODE_STATUS_ENDPOINT="$(/opt/bin/video_gridUrl.sh)/status"
2828
else
29-
JQ_SESSION_ID_QUERY=".[]?.node?.slots | .[0]?.session?.sessionId"
29+
JQ_SESSION_ID_QUERY=".[-1]?.node?.slots | .[-1]?.session?.sessionId"
3030
SE_NODE_PORT=${SE_NODE_PORT:-"5555"}
3131
NODE_STATUS_ENDPOINT="${SE_SERVER_PROTOCOL}://${DISPLAY_CONTAINER_NAME}:${SE_NODE_PORT}/status"
3232
fi

Video/video_graphQLQuery.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22

33
max_time=1
4-
retry_time=3
4+
retry_time=2
55

66
# Define parameters
77
SESSION_ID=$1

0 commit comments

Comments
 (0)