mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00

* set progress internval * add keep alive * add keepalive * remove cat * smaller time * squash error * reduce log spam
30 lines
510 B
Bash
Executable file
30 lines
510 B
Bash
Executable file
#!/bin/bash
|
|
# Run a command, printing periodically to keep travis alive.
|
|
|
|
PID=$$
|
|
|
|
# Print output to avoid travis killing us
|
|
watchdog() {
|
|
for i in `seq 5 5 150`; do
|
|
sleep 300
|
|
echo "(running, ${i}m total)"
|
|
done
|
|
echo "Command timed out after 2.5h, dumping logs:"
|
|
echo "TIMED OUT"
|
|
kill -SIGKILL $PID
|
|
}
|
|
|
|
watchdog & 2>/dev/null
|
|
WATCHDOG_PID=$!
|
|
|
|
time "$@"
|
|
|
|
CODE=$?
|
|
if [ $CODE != 0 ]; then
|
|
echo "FAILED $CODE"
|
|
kill $WATCHDOG_PID
|
|
exit $CODE
|
|
fi
|
|
|
|
kill $WATCHDOG_PID
|
|
exit 0
|