Skip to content

Commit 3563d75

Browse files
authored
fix: retain runtime logs (#191)
fix #183
1 parent ed6715b commit 3563d75

File tree

7 files changed

+10
-7
lines changed

7 files changed

+10
-7
lines changed

logs/runtime/.gitkeep

Whitespace-only changes.

record.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,9 @@ host=0.0.0.0
99
port=2233
1010

1111
kill -9 $(ps aux | grep '[b]lrec' | awk '{print $2}')
12-
nohup blrec -c $config --open --host $host --port $port > $BILIVE_PATH/logs/blrec.log 2>&1 &
13-
echo "blrec run success!"
12+
nohup blrec -c $config --open --host $host --port $port > $BILIVE_PATH/logs/runtime/blrec-$(date +%Y%m%d-%H%M%S).log 2>&1 &
13+
if [ $? -eq 0 ]; then
14+
echo "success"
15+
else
16+
echo "An error occurred while starting blrec. Check the logs for details."
17+
fi

scan.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# kill the previous scanSegments process
22
kill -9 $(ps aux | grep 'src.burn.scan' | grep -v grep | awk '{print $2}')
33
# start the scanSegments process
4-
python -m src.burn.scan
4+
nohup python -m src.burn.scan > $BILIVE_PATH/logs/runtime/scan-$(date +%Y%m%d-%H%M%S).log 2>&1 &
55
# Check if the last command was successful
66
if [ $? -eq 0 ]; then
77
echo "success"

settings.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ duration_limit = 1800
1313
out_dir = "./Videos"
1414

1515
[logging]
16-
log_dir = "./logs/blrecLog"
16+
log_dir = "./logs/blrec"
1717
console_log_level = "INFO"
1818
backup_count = 30
1919

src/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import configparser
77

88
# ============================ Your configuration ============================
9-
GPU_EXIST=True
9+
GPU_EXIST=False
1010
# Can be pipeline, append, merge
1111
MODEL_TYPE = "append"
1212
Inference_Model = "small"

upload.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
kill -9 $(ps aux | grep '[u]pload' | awk '{print $2}')
33
kill -9 $(ps aux | grep '[b]iliup' | awk '{print $2}')
44
# start the scanSegments process
5-
# nohup $BILIVE_PATH/src/upload/uploadQueue.sh > $BILIVE_PATH/logs/uploadQueue.log 2>&1 &
6-
python -m src.upload.upload
5+
nohup python -m src.upload.upload > $BILIVE_PATH/logs/runtime/upload-$(date +%Y%m%d-%H%M%S).log 2>&1 &
76
# Check if the last command was successful
87
if [ $? -eq 0 ]; then
98
echo "success"

0 commit comments

Comments
 (0)