mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
fw-addr-lists: rework the retry logic
... with increasing delay.
This commit is contained in:
parent
1f6040178f
commit
d4e5194a65
1 changed files with 7 additions and 4 deletions
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue