first successful test
This commit is contained in:
17
templates/service_timeout.sh.j2
Normal file
17
templates/service_timeout.sh.j2
Normal file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
i=1
|
||||
while [ $i ]
|
||||
do
|
||||
|
||||
TIME_ELAPSED=$(curl -s http://172.17.0.1:5000/status | jq .Elapsed_Time)
|
||||
TIMEOUT_VALUE=$(cat {{ streaming_working_folder }}/service_control/duration.json | jq .seconds)
|
||||
if [[ $TIME_ELAPSED -gt $TIMEOUT_VALUE ]]; then
|
||||
curl -s http://172.17.0.1:5000/stop
|
||||
i=0
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user