File name
Commit message
Commit date
후처리 모듈 및 메인 서버 전달을 위한 수정 1. ITS cctv 스트리밍 정보를 하나의 프로세스가 하나의 영상을 담당하여 처리 및 실행하기 위한 스크립트와 bash 스크립트 2. FrameCapturer 객체에 위경도 정보 필수 arg
05-20
note to myself : http headers does not use '_', and will be converted into '-', and by convention, should use captical letter at the first letter of each words.
05-24
#!/bin/bash
# Array to hold the process IDs
declare -a pids
PYTHONPATH="/home/juni/PycharmProjects/segmentation_overlapping"
# Start multiple Python processes in the background
python streaming_process.py --cctv_num 0 &
pids+=($!)
python streaming_process.py --cctv_num 1 &
pids+=($!)
#python test.py
python inference_endpoint.py
#gunicorn --workers=6 inference_endpoint:app
pids+=($!)
#python postprocess_draft.py
#pids+=($!)
# Function to kill all processes
cleanup() {
echo "Terminating all processes..."
for pid in "${pids[@]}"; do
# Attempt to terminate the process
kill -9 $pid
# Wait a bit for the process to terminate
sleep 1
# Check if the process is still running
if kill -0 $pid 2>/dev/null; then
echo "Process $pid did not terminate, trying again..."
kill -9 $pid
sleep 1 # Wait a bit before checking again
# Final check - if it still didn't terminate, report failure
if kill -0 $pid 2>/dev/null; then
echo "Failed to terminate process $pid."
else
echo "Process $pid terminated successfully after retry."
fi
else
echo "Process $pid terminated successfully."
fi
done
echo "Exiting script."
exit 0 # Exit the script
}
# Trap keyboard interrupt and call cleanup
trap cleanup SIGINT
# Print message
echo "Running... Press Ctrl+C to stop."
# Wait forever until Ctrl+C is pressed
while true; do
sleep 1
done