Skip to content

Commit ed2af41

Browse files
authored
update: FFmpeg 7.0.2 and fix video container termination (#2374)
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent 918765f commit ed2af41

21 files changed

+255
-287
lines changed

Diff for: .github/workflows/helm-chart-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ jobs:
156156
max_attempts: 3
157157
command: |
158158
NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} TEST_UPGRADE_CHART=false make chart_test_autoscaling_${{ matrix.test-strategy }} \
159-
&& make test_video_integrity
159+
&& NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make test_video_integrity
160160
- name: Test chart upgrade
161161
if: (matrix.test-upgrade == true)
162162
run: |

Diff for: Makefile

+17-13
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ MAJOR := $(word 1,$(subst ., ,$(TAG_VERSION)))
1818
MINOR := $(word 2,$(subst ., ,$(TAG_VERSION)))
1919
MAJOR_MINOR_PATCH := $(word 1,$(subst -, ,$(TAG_VERSION)))
2020
FFMPEG_TAG_PREV_VERSION := $(or $(FFMPEG_TAG_PREV_VERSION),$(FFMPEG_TAG_PREV_VERSION),ffmpeg-7.0.1)
21-
FFMPEG_TAG_VERSION := $(or $(FFMPEG_TAG_VERSION),$(FFMPEG_TAG_VERSION),ffmpeg-7.0.1)
21+
FFMPEG_TAG_VERSION := $(or $(FFMPEG_TAG_VERSION),$(FFMPEG_TAG_VERSION),ffmpeg-7.0.2)
2222
FFMPEG_BASED_NAME := $(or $(FFMPEG_BASED_NAME),$(FFMPEG_BASED_NAME),linuxserver)
23-
FFMPEG_BASED_TAG := $(or $(FFMPEG_BASED_TAG),$(FFMPEG_BASED_TAG),7.0.1)
23+
FFMPEG_BASED_TAG := $(or $(FFMPEG_BASED_TAG),$(FFMPEG_BASED_TAG),7.0.2)
2424
PLATFORMS := $(or $(PLATFORMS),$(shell echo $$PLATFORMS),linux/amd64)
2525
SEL_PASSWD := $(or $(SEL_PASSWD),$(SEL_PASSWD),secret)
2626

@@ -560,18 +560,21 @@ test_chromium:
560560
test_chromium_standalone:
561561
PLATFORMS=$(PLATFORMS) VERSION=$(TAG_VERSION) NAMESPACE=$(NAMESPACE) BASE_RELEASE=$(BASE_RELEASE) BASE_VERSION=$(BASE_VERSION) BINDING_VERSION=$(BINDING_VERSION) SKIP_BUILD=true ./tests/bootstrap.sh StandaloneChromium
562562

563-
test_parallel: hub chrome firefox edge chromium
563+
test_parallel: hub chrome firefox edge chromium video
564564
sudo rm -rf ./tests/tests
565565
sudo rm -rf ./tests/videos; mkdir -p ./tests/videos
566566
sudo cp -r ./charts/selenium-grid/certs ./tests/videos
567567
for node in DeploymentAutoscaling JobAutoscaling ; do \
568568
cd ./tests || true ; \
569569
echo TAG=$(TAG_VERSION) > .env ; \
570-
echo TEST_DRAIN_AFTER_SESSION_COUNT=$(or $(TEST_DRAIN_AFTER_SESSION_COUNT), 0) >> .env ; \
570+
echo VIDEO_TAG=$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) >> .env ; \
571+
echo TEST_DELAY_AFTER_TEST=$(or $(TEST_DELAY_AFTER_TEST), 2) >> .env ; \
572+
echo TEST_DRAIN_AFTER_SESSION_COUNT=$(or $(TEST_DRAIN_AFTER_SESSION_COUNT), 2) >> .env ; \
571573
echo TEST_PARALLEL_HARDENING=$(or $(TEST_PARALLEL_HARDENING), "true") >> .env ; \
572574
echo TEST_PARALLEL_COUNT=$(or $(TEST_PARALLEL_COUNT), 5) >> .env ; \
575+
echo HUB_CHECKS_INTERVAL=$(or $(HUB_CHECKS_INTERVAL), 45) >> .env ; \
573576
echo LOG_LEVEL=$(or $(LOG_LEVEL), "INFO") >> .env ; \
574-
echo REQUEST_TIMEOUT=$(or $(REQUEST_TIMEOUT), 300) >> .env ; \
577+
echo REQUEST_TIMEOUT=$(or $(REQUEST_TIMEOUT), 600) >> .env ; \
575578
echo NODE=$$node >> .env ; \
576579
echo UID=$$(id -u) >> .env ; \
577580
echo BINDING_VERSION=$(BINDING_VERSION) >> .env ; \
@@ -586,14 +589,15 @@ test_parallel: hub chrome firefox edge chromium
586589
export $$(cat .env | xargs) ; \
587590
DOCKER_DEFAULT_PLATFORM=$(PLATFORMS) docker compose --profile $(PLATFORMS) -f docker-compose-v3-test-parallel.yml up -d --remove-orphans --no-log-prefix ; \
588591
RUN_IN_DOCKER_COMPOSE=true bash ./bootstrap.sh $$node ; \
589-
done ; \
590-
docker compose -f docker-compose-v3-test-parallel.yml down
592+
docker compose -f docker-compose-v3-test-parallel.yml down ; \
593+
done
594+
make test_video_integrity
591595

592596
test_video_standalone: standalone_chrome standalone_chromium standalone_firefox standalone_edge
593-
DOCKER_COMPOSE_FILE=docker-compose-v3-test-standalone.yml make test_video
597+
DOCKER_COMPOSE_FILE=docker-compose-v3-test-standalone.yml TEST_DELAY_AFTER_TEST=2 make test_video
594598

595599
test_video_dynamic_name:
596-
VIDEO_FILE_NAME=auto \
600+
VIDEO_FILE_NAME=auto TEST_DELAY_AFTER_TEST=2 \
597601
make test_video
598602

599603
# This should run on its own CI job. There is no need to combine it with the other tests.
@@ -617,7 +621,7 @@ test_video: video hub chrome firefox edge chromium
617621
echo NODE=$$node >> .env ; \
618622
echo UID=$$(id -u) >> .env ; \
619623
echo BINDING_VERSION=$(BINDING_VERSION) >> .env ; \
620-
echo TEST_DELAY_AFTER_TEST=$(or $(TEST_DELAY_AFTER_TEST), 0) >> .env ; \
624+
echo TEST_DELAY_AFTER_TEST=$(or $(TEST_DELAY_AFTER_TEST), 2) >> .env ; \
621625
echo SELENIUM_ENABLE_MANAGED_DOWNLOADS=$(or $(SELENIUM_ENABLE_MANAGED_DOWNLOADS), "true") >> .env ; \
622626
echo BASIC_AUTH_USERNAME=$(or $(BASIC_AUTH_USERNAME), "admin") >> .env ; \
623627
echo BASIC_AUTH_PASSWORD=$(or $(BASIC_AUTH_PASSWORD), "admin") >> .env ; \
@@ -697,7 +701,7 @@ test_node_relay: hub node_base standalone_firefox
697701

698702
test_standalone_docker: standalone_docker
699703
DOCKER_COMPOSE_FILE=docker-compose-v3-test-standalone-docker.yaml CONFIG_FILE=standalone_docker_config.toml \
700-
RECORD_STANDALONE=true GRID_URL=http://0.0.0.0:4444 LIST_OF_TESTS_AMD64="DeploymentAutoscaling" TEST_PARALLEL_HARDENING=true \
704+
RECORD_STANDALONE=true GRID_URL=http://0.0.0.0:4444 LIST_OF_TESTS_AMD64="DeploymentAutoscaling" TEST_PARALLEL_HARDENING=true TEST_DELAY_AFTER_TEST=2 \
701705
SELENIUM_ENABLE_MANAGED_DOWNLOADS=true LOG_LEVEL=SEVERE SKIP_CHECK_DOWNLOADS_VOLUME=true make test_node_docker
702706

703707
test_node_docker: hub standalone_docker standalone_chrome standalone_firefox standalone_edge standalone_chromium video
@@ -725,7 +729,7 @@ test_node_docker: hub standalone_docker standalone_chrome standalone_firefox sta
725729
echo LOG_LEVEL=$(or $(LOG_LEVEL), "INFO") >> .env ; \
726730
echo REQUEST_TIMEOUT=$(or $(REQUEST_TIMEOUT), 300) >> .env ; \
727731
echo SELENIUM_ENABLE_MANAGED_DOWNLOADS=$(or $(SELENIUM_ENABLE_MANAGED_DOWNLOADS), "false") >> .env ; \
728-
echo TEST_DELAY_AFTER_TEST=$(or $(TEST_DELAY_AFTER_TEST), 0) >> .env ; \
732+
echo TEST_DELAY_AFTER_TEST=$(or $(TEST_DELAY_AFTER_TEST), 2) >> .env ; \
729733
echo RECORD_STANDALONE=$(or $(RECORD_STANDALONE), "true") >> .env ; \
730734
echo GRID_URL=$(or $(GRID_URL), "") >> .env ; \
731735
echo NODE=$$node >> .env ; \
@@ -790,7 +794,7 @@ test_video_integrity:
790794
fi; \
791795
for file in $$list_files; do \
792796
echo "Checking video file: $$file"; \
793-
docker run -u $$(id -u) -v $$(pwd):$$(pwd) -w $$(pwd) --entrypoint="" $(FFMPEG_BASED_NAME)/ffmpeg:$(FFMPEG_BASED_TAG) ffmpeg -v error -i "$$file" -f null - ; \
797+
docker run -u $$(id -u) -v $$(pwd):$$(pwd) -w $$(pwd) --entrypoint="" $(NAME)/video:$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) ffmpeg -v error -i "$$file" -f null - ; \
794798
if [ $$? -ne 0 ]; then \
795799
echo "Video file $$file is corrupted"; \
796800
number_corrupted_files=$$((number_corrupted_files+1)); \

Diff for: README.md

+20-9
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Talk to us at https://www.selenium.dev/support/
4949
* [Execution with Docker Compose](#execution-with-docker-compose)
5050
* [Configuring the child containers](#configuring-the-child-containers)
5151
* [Video recording, screen resolution, and time zones in a Dynamic Grid](#video-recording-screen-resolution-and-time-zones-in-a-dynamic-grid)
52+
* [Time zone configuration via env variable](#time-zone-configuration-via-env-variable)
5253
* [Deploying to Kubernetes](#deploying-to-kubernetes)
5354
* [Configuring the containers](#configuring-the-containers)
5455
* [SE_OPTS Selenium Configuration Options](#se_opts-selenium-configuration-options)
@@ -712,13 +713,13 @@ When using in Dynamic Grid, those variables should be combined with the prefix `
712713

713714
### Environment variables and default values for upload feature
714715

715-
| Environment variable | Default value | Description |
716-
|-------------------------------|------------------------------------|-------------------------------------------------------------------------------------------|
717-
| `SE_UPLOAD_RETAIN_LOCAL_FILE` | `false` | Keep local file after uploading successfully |
718-
| `SE_UPLOAD_COMMAND` | `copy` | RCLONE command is used to transfer file. Enforce `move` when retain local file is `false` |
719-
| `SE_UPLOAD_OPTS` | `-P --cutoff-mode SOFT --metadata` | Other options belong to RCLONE command can be set. |
720-
| `SE_UPLOAD_CONFIG_FILE_NAME` | `upload.conf` | Config file for remote host instead of set via env variable prefix SE_RCLONE_* |
721-
| `SE_UPLOAD_CONFIG_DIRECTORY` | `/opt/bin` | Directory of config file (change it when conf file in another directory is mounted) |
716+
| Environment variable | Default value | Description |
717+
|-------------------------------|---------------------------------------------|-------------------------------------------------------------------------------------------|
718+
| `SE_UPLOAD_RETAIN_LOCAL_FILE` | `false` | Keep local file after uploading successfully |
719+
| `SE_UPLOAD_COMMAND` | `copy` | RCLONE command is used to transfer file. Enforce `move` when retain local file is `false` |
720+
| `SE_UPLOAD_OPTS` | `-P --cutoff-mode SOFT --metadata--inplace` | Other options belong to RCLONE command can be set. |
721+
| `SE_UPLOAD_CONFIG_FILE_NAME` | `upload.conf` | Config file for remote host instead of set via env variable prefix SE_RCLONE_* |
722+
| `SE_UPLOAD_CONFIG_DIRECTORY` | `/opt/bin` | Directory of config file (change it when conf file in another directory is mounted) |
722723

723724
___
724725

@@ -971,8 +972,6 @@ docker run --rm --name selenium-docker -p 4444:4444 `
971972
selenium/standalone-docker:4.23.1-20240820
972973
```
973974

974-
975-
976975
### Video recording, screen resolution, and time zones in a Dynamic Grid
977976
To record your WebDriver session, you need to add a `se:recordVideo`
978977
field set to `true`. You can also set a time zone and a screen resolution,
@@ -1009,6 +1008,18 @@ driver.quit()
10091008
After test executed, under (`${PWD}/assets`) you can see the video file name in path `/<sessionId>/test_visit_basic_auth_secured_page_ChromeTests.mp4`
10101009

10111010
The file name will be trimmed to 255 characters to avoid long file names. Moreover, the `space` character will be replaced by `_`, and only the characters alphabets, numbers, `-` (hyphen), and `_` (underscore) are retained in the file name. (This feat is available once this [PR](https://github.com/SeleniumHQ/selenium/pull/13907) merged)
1011+
1012+
### Time zone configuration via env variable
1013+
1014+
`tzdata` is installed in based images, and you can set the time zone in container by using the env variable `TZ`.
1015+
By default, the time zone is set to `UTC`.
1016+
List of supported time zones can be found [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For example:
1017+
1018+
```bash
1019+
$ docker run --rm --entrypoint="" -e TZ=Asia/Ho_Chi_Minh selenium/node-chromium:latest date +%FT%T%Z
1020+
2024-08-28T18:19:26+07
1021+
```
1022+
10121023
___
10131024

10141025
## Deploying to Kubernetes

Diff for: Video/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ RUN curl -fLo /tmp/rclone.zip https://downloads.rclone.org/rclone-${RCLONE_VERSI
8383
&& rm -rf /tmp/rclone-*
8484
COPY --chown="${SEL_UID}:${SEL_GID}" upload.sh upload.conf /opt/bin/
8585
ENV SE_VIDEO_UPLOAD_ENABLED=false \
86-
SE_VIDEO_INTERNAL_UPLOAD=false \
86+
SE_VIDEO_INTERNAL_UPLOAD=true \
8787
SE_UPLOAD_DESTINATION_PREFIX=""
8888

8989
RUN mkdir -p /var/run/supervisor /var/log/supervisor ${VIDEO_FOLDER} \
@@ -101,6 +101,7 @@ CMD ["/opt/bin/entry_point.sh"]
101101
ENV DISPLAY_NUM=99 \
102102
DISPLAY_CONTAINER_NAME=selenium \
103103
SE_SERVER_PROTOCOL="http" \
104+
SE_VIDEO_POLL_INTERVAL=1 \
104105
SE_SCREEN_WIDTH=1920 \
105106
SE_SCREEN_HEIGHT=1080 \
106107
SE_FRAME_RATE=15 \

Diff for: Video/supervisord.conf

+10-3
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,43 @@ minfds=1024 ; (min. avail startup file descrip
1212
minprocs=200 ; (min. avail process descriptors;default 200)
1313

1414
[program:video-recording]
15-
priority=0
15+
priority=10
1616
command=/opt/bin/video.sh
1717
killasgroup=true
1818
autostart=true
1919
startsecs=0
2020
autorestart=true
21+
stopsignal=TERM
22+
stopwaitsecs=30
2123

2224
;Logs (all activity redirected to stdout so it can be seen through "docker logs"
2325
redirect_stderr=true
2426
stdout_logfile=/dev/stdout
2527
stdout_logfile_maxbytes=0
2628

2729
[program:video-ready]
28-
priority=5
30+
priority=0
2931
command=python3 /opt/bin/video_ready.py
3032
killasgroup=true
3133
autostart=true
34+
startsecs=0
3235
autorestart=true
36+
stopsignal=KILL
3337

3438
;Logs (all activity redirected to stdout so it can be seen through "docker logs"
3539
redirect_stderr=true
3640
stdout_logfile=/dev/stdout
3741
stdout_logfile_maxbytes=0
3842

3943
[program:video-upload]
40-
priority=10
44+
priority=5
4145
command=/opt/bin/upload.sh
4246
killasgroup=true
4347
autostart=%(ENV_SE_VIDEO_INTERNAL_UPLOAD)s
48+
startsecs=0
4449
autorestart=%(ENV_SE_VIDEO_INTERNAL_UPLOAD)s
50+
stopsignal=TERM
51+
stopwaitsecs=30
4552

4653
;Logs (all activity redirected to stdout so it can be seen through "docker logs"
4754
redirect_stderr=true

Diff for: Video/upload.sh

+50-57
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ VIDEO_FOLDER=${VIDEO_FOLDER}
44
UPLOAD_CONFIG_DIRECTORY=${SE_UPLOAD_CONFIG_DIRECTORY:-"/opt/bin"}
55
UPLOAD_CONFIG_FILE_NAME=${SE_UPLOAD_CONFIG_FILE_NAME:-"upload.conf"}
66
UPLOAD_COMMAND=${SE_UPLOAD_COMMAND:-"copy"}
7-
UPLOAD_OPTS=${SE_UPLOAD_OPTS:-"-P --cutoff-mode SOFT --metadata"}
7+
UPLOAD_OPTS=${SE_UPLOAD_OPTS:-"-P --cutoff-mode SOFT --metadata --inplace"}
88
UPLOAD_RETAIN_LOCAL_FILE=${SE_UPLOAD_RETAIN_LOCAL_FILE:-"false"}
99
UPLOAD_PIPE_FILE_NAME=${SE_UPLOAD_PIPE_FILE_NAME:-"uploadpipe"}
10-
SE_VIDEO_INTERNAL_UPLOAD=${SE_VIDEO_INTERNAL_UPLOAD:-"false"}
10+
VIDEO_INTERNAL_UPLOAD=${VIDEO_INTERNAL_UPLOAD:-$SE_VIDEO_INTERNAL_UPLOAD}
1111
VIDEO_UPLOAD_BATCH_CHECK=${SE_VIDEO_UPLOAD_BATCH_CHECK:-"10"}
1212
process_name="video.uploader"
1313

14-
if [ "${SE_VIDEO_INTERNAL_UPLOAD}" = "true" ];
14+
if [ "${VIDEO_INTERNAL_UPLOAD}" = "true" ];
1515
then
1616
# If using RCLONE in the same container, write signal to /tmp internally
1717
UPLOAD_PIPE_FILE="/tmp/${UPLOAD_PIPE_FILE_NAME}"
@@ -65,78 +65,71 @@ function rclone_upload() {
6565
check_and_clear_background
6666
}
6767

68-
function consume_pipe_file() {
68+
function check_if_pid_alive() {
69+
local pid=$1
70+
if kill -0 "${pid}" > /dev/null 2>&1; then
71+
return 0
72+
fi
73+
return 1
74+
}
75+
76+
function consume_pipe_file_in_background() {
77+
echo "$(date +%FT%T%Z) [${process_name}] - Start consuming pipe file to upload"
6978
while read FILE DESTINATION < ${UPLOAD_PIPE_FILE};
7079
do
7180
if [ "${FILE}" = "exit" ];
7281
then
73-
FORCE_EXIT=true
74-
exit
82+
echo "$(date +%FT%T%Z) [${process_name}] - Received exit signal. Aborting upload process"
83+
return 0
7584
elif [ "$FILE" != "" ] && [ "$DESTINATION" != "" ];
7685
then
7786
rclone_upload "${FILE}" "${DESTINATION}"
78-
elif [ -f ${FORCE_EXIT_FILE} ];
79-
then
80-
echo "$(date +%FT%T%Z) [${process_name}] - Force exit signal detected"
81-
exit
8287
fi
8388
done
89+
echo "$(date +%FT%T%Z) [${process_name}] - Stopped consuming pipe file. Upload process is done"
90+
return 0
8491
}
8592

86-
function graceful_exit() {
87-
echo "$(date +%FT%T%Z) [${process_name}] - Uploader is shutting down"
88-
if [ "${FORCE_EXIT}" != "true" ]; then
89-
consume_pipe_file
93+
# Function to check if the named pipe exists
94+
check_if_pipefile_exists() {
95+
if [ -p "${UPLOAD_PIPE_FILE}" ]; then
96+
echo "$(date +%FT%T%Z) [${process_name}] - Named pipe ${UPLOAD_PIPE_FILE} exists"
97+
return 0
9098
fi
91-
echo "$(date +%FT%T%Z) [${process_name}] - Uploader consumed all files in the pipe"
92-
rm -rf ${FORCE_EXIT_FILE}
93-
echo "$(date +%FT%T%Z) [${process_name}] - Uploader is ready to shutdown"
99+
return 1
94100
}
95-
trap graceful_exit SIGTERM SIGINT EXIT
96101

97-
# Function to create the named pipe if it doesn't exist
98-
function create_named_pipe() {
99-
if [ ! -p "${UPLOAD_PIPE_FILE}" ];
100-
then
101-
if [ -e "${UPLOAD_PIPE_FILE}" ];
102-
then
103-
rm -f "${UPLOAD_PIPE_FILE}"
104-
fi
105-
mkfifo "${UPLOAD_PIPE_FILE}"
106-
echo "$(date +%FT%T%Z) [${process_name}] - Created named pipe ${UPLOAD_PIPE_FILE}"
102+
function wait_until_pipefile_exists() {
103+
echo "$(date +%FT%T%Z) [${process_name}] - Waiting for ${UPLOAD_PIPE_FILE} to be present"
104+
until check_if_pipefile_exists; do
105+
sleep 1
106+
done
107+
}
108+
109+
function graceful_exit() {
110+
echo "$(date +%FT%T%Z) [${process_name}] - Trapped SIGTERM/SIGINT/x so shutting down uploader"
111+
if ! check_if_pid_alive "${UPLOAD_PID}"; then
112+
consume_pipe_file_in_background &
113+
UPLOAD_PID=$!
107114
fi
115+
echo "exit" >> "${UPLOAD_PIPE_FILE}" &
116+
wait "${UPLOAD_PID}"
117+
echo "$(date +%FT%T%Z) [${process_name}] - Uploader consumed all files in the pipe"
118+
rm -rf "${FORCE_EXIT_FILE}"
119+
echo "$(date +%FT%T%Z) [${process_name}] - Uploader is ready to shutdown"
120+
exit 0
108121
}
109122

110-
TIMEOUT=300 # Timeout in seconds (5 minutes)
111-
START_TIME=$(date +%s)
123+
rename_rclone_env
124+
trap graceful_exit SIGTERM SIGINT EXIT
112125

113126
while true; do
114-
if [ -e "${UPLOAD_PIPE_FILE}" ];
115-
then
116-
if [ -p "${UPLOAD_PIPE_FILE}" ];
117-
then
118-
break
119-
else
120-
echo "$(date +%FT%T%Z) [${process_name}] - ${UPLOAD_PIPE_FILE} exists but is not a named pipe"
121-
create_named_pipe
122-
fi
123-
else
124-
create_named_pipe
125-
fi
126-
127-
CURRENT_TIME=$(date +%s)
128-
ELAPSED_TIME=$((CURRENT_TIME - START_TIME))
129-
if [ ${ELAPSED_TIME} -ge ${TIMEOUT} ];
130-
then
131-
echo "$(date +%FT%T%Z) [${process_name}] - Timeout waiting for ${UPLOAD_PIPE_FILE} to be created"
132-
exit 1
127+
wait_until_pipefile_exists
128+
if ! check_if_pid_alive "${UPLOAD_PID}"; then
129+
consume_pipe_file_in_background &
130+
UPLOAD_PID=$!
133131
fi
134-
135-
echo "$(date +%FT%T%Z) [${process_name}] - Waiting for ${UPLOAD_PIPE_FILE} to be created"
136-
sleep 1
132+
while check_if_pid_alive "${UPLOAD_PID}"; do
133+
sleep 1
134+
done
137135
done
138-
139-
echo "$(date +%FT%T%Z) [${process_name}] - Waiting for video files put into pipe for proceeding to upload"
140-
141-
rename_rclone_env
142-
consume_pipe_file

0 commit comments

Comments
 (0)