aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-12-10 17:12:24 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-12-17 11:20:09 +0100
commit42bcc63d29c85a7fcdb175b3ea725654d2db7039 (patch)
treef2d48ad75bb018543df7b19a2389d895229ac46b
parentbceabebf9c6c30e2b1057448d74a5de006ef5d1e (diff)
mod/notification-email: increase retry interval on failure
-rw-r--r--mod/notification-email.rsc6
1 files changed, 4 insertions, 2 deletions
diff --git a/mod/notification-email.rsc b/mod/notification-email.rsc
index dd90923..b109bf4 100644
--- a/mod/notification-email.rsc
+++ b/mod/notification-email.rsc
@@ -46,8 +46,9 @@
:local AllDone true;
:local QueueLen [ :len $EmailQueue ];
:local Scheduler [ /system/scheduler/find where name="_FlushEmailQueue" ];
+ :local SchedVal [ /system/scheduler/get $Scheduler ];
- :if ([ :len $Scheduler ] > 0 && [ /system/scheduler/get $Scheduler interval ] < 1m) do={
+ :if ([ :len $Scheduler ] > 0 && ($SchedVal->"interval") < 1m) do={
/system/scheduler/set interval=1m comment="Doing initial checks..." $Scheduler;
}
@@ -111,7 +112,8 @@
/system/scheduler/remove $Scheduler;
:set EmailQueue;
} else={
- /system/scheduler/set interval=1m comment="Waiting for retry..." $Scheduler;
+ /system/scheduler/set interval=(($SchedVal->"run-count") . "m") \
+ comment="Waiting for retry..." $Scheduler;
}
} on-error={
:global ExitError; $ExitError false $0;