From d3accb4d657edd61f6f48e9f3ce1534f5eb9f9c8 Mon Sep 17 00:00:00 2001 From: Raynor Date: Wed, 21 Dec 2022 03:29:28 +0000 Subject: [PATCH] Added a basic backoff if in archive mode --- scripts/stream-url.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/stream-url.sh b/scripts/stream-url.sh index 68f0ada..a0b6193 100644 --- a/scripts/stream-url.sh +++ b/scripts/stream-url.sh @@ -36,6 +36,13 @@ do fi done else - curl -X "GET" "$url" --no-progress-meter >> "/data/$today.$host.json" + curl -X "GET" "$url" --no-progress-meter >> "/data/$today/$today.$host.json" fi + + # If we are in archive mode only, then back off if there is a curl error. + if [[ $archive == "true" ]] + then + sleep 5m; + fi + done \ No newline at end of file