diff options
author | Christian Hesse <mail@eworm.de> | 2023-10-19 21:15:23 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2023-10-19 21:17:03 +0200 |
commit | d4e5194a65b5a40ce458382d28b8af45086b80f7 (patch) | |
tree | 0f6e888f9e956b2ec897ab521c580adcd0413cbd | |
parent | 1f6040178fa14fafb1561c97a7f5aff9449c1ba6 (diff) |
fw-addr-lists: rework the retry logic
... with increasing delay.
-rw-r--r-- | fw-addr-lists.rsc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fw-addr-lists.rsc b/fw-addr-lists.rsc index 38fdd96..26e9f98 100644 --- a/fw-addr-lists.rsc +++ b/fw-addr-lists.rsc @@ -50,13 +50,16 @@ $WaitFullyConnected; } } - :for I from=2 to=0 do={ + :for I from=1 to=4 do={ :if ($Data = false) do={ :do { - :set Data ([ /tool/fetch ($List->"url") check-certificate=$CheckCertificate output=user as-value ]->"data"); + :set Data ([ /tool/fetch check-certificate=$CheckCertificate output=user \ + ($List->"url") as-value ]->"data"); } on-error={ - $LogPrintExit2 debug $0 ("Failed downloading, " . $I . " retries pending: " . $List->"url") false; - :delay 2s; + :if ($I < 4) do={ + $LogPrintExit2 debug $0 ("Failed downloading, " . $I . ". try: " . $List->"url") false; + :delay (($I * $I) . "s"); + } } } } |