mirror of
https://github.com/langchain-ai/datafusion.git
synced 2026-07-18 13:15:59 -04:00
c3681dc865
Try add a timeout to the apt-get invocation so that retry can kick in.
22 lines
334 B
Bash
Executable File
22 lines
334 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
x() {
|
|
echo "+ $*" >&2
|
|
"$@"
|
|
}
|
|
|
|
max_retry_time_seconds=$(( 5 * 60 ))
|
|
retry_delay_seconds=10
|
|
|
|
END=$(( $(date +%s) + ${max_retry_time_seconds} ))
|
|
|
|
while (( $(date +%s) < $END )); do
|
|
x "$@" && exit 0
|
|
sleep "${retry_delay_seconds}"
|
|
done
|
|
|
|
echo "$0: retrying [$*] timed out" >&2
|
|
exit 1
|