Overhaul cache system

This commit is contained in:
BtbN
2023-12-21 01:31:23 +01:00
parent 75902682ba
commit 7ed76a8724
116 changed files with 179 additions and 358 deletions

View File

@ -1,11 +1,11 @@
#!/bin/bash
set -xe
set -xe -o pipefail
RETRY_COUNTER=0
MAX_RETRY=10
CUR_TIMEOUT=120
while [[ $RETRY_COUNTER -lt $MAX_RETRY ]]; do
timeout $CUR_TIMEOUT "$@" && break || sleep $(shuf -i 5-90 -n 1)
(timeout $CUR_TIMEOUT "$@") && break || sleep $(shuf -i 5-90 -n 1)
RETRY_COUNTER=$(( $RETRY_COUNTER + 1 ))
CUR_TIMEOUT=$(( $CUR_TIMEOUT + 60 ))
echo "Retry $RETRY_COUNTER..."