Files
vcr_capture/templates/service_timeout.sh

18 lines
316 B
Bash

#!/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