aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2022-09-15 21:56:31 +0200
committerGravatar Christian Hesse <mail@eworm.de>2022-09-15 22:25:59 +0200
commit3f92edb5c1a5415de5e9ebfd4a5139cb687d3956 (patch)
tree9ffd659ffe2c7f5dcacda004344018b573f36a4e
parentf2457513399799a5183f00738081a606efd39afc (diff)
global-functions: $FlushEmailQueue: use $0 for scheduler name
-rw-r--r--global-functions12
1 files changed, 6 insertions, 6 deletions
diff --git a/global-functions b/global-functions
index 8d8ac1c..7c8bfdc 100644
--- a/global-functions
+++ b/global-functions
@@ -340,11 +340,11 @@
:return false;
}
- :if ([ :len [ /system/scheduler/find where name="FlushEmailQueue" ] ] > 0 && $QueueLen = 0) do={
+ :if ([ :len [ /system/scheduler/find where name=$0 ] ] > 0 && $QueueLen = 0) do={
$LogPrintExit2 warning $0 ("Flushing E-Mail messages from scheduler, but queue is empty.") false;
}
- /system/scheduler/set interval=($QueueLen . "m") [ find where name="FlushEmailQueue" ];
+ /system/scheduler/set interval=($QueueLen . "m") [ find where name=$0 ];
:foreach Id,Message in=$EmailQueue do={
:if ([ :typeof $Message ] = "array" ) do={
@@ -374,10 +374,10 @@
}
:if ($AllDone = true && $QueueLen = [ :len $EmailQueue ]) do={
- /system/scheduler/remove [ find where name="FlushEmailQueue" ];
+ /system/scheduler/remove [ find where name=$0 ];
:set EmailQueue;
} else={
- /system/scheduler/set interval=1m [ find where name="FlushEmailQueue" ];
+ /system/scheduler/set interval=1m [ find where name=$0 ];
}
}
@@ -634,8 +634,8 @@
[ $IfThenElse ([ :len ($Notification->"link") ] > 0) ("\n\n" . ($Notification->"link")) "" ] . \
[ $IfThenElse ([ :len $Signature ] > 0) ("\n-- \n" . $Signature) "" ]); \
attach=($Notification->"attach"); remove-attach=($Notification->"remove-attach") };
- :if ([ :len [ /system/scheduler/find where name="FlushEmailQueue" ] ] = 0) do={
- /system/scheduler/add name=FlushEmailQueue interval=1s start-time=startup \
+ :if ([ :len [ /system/scheduler/find where name="\$FlushEmailQueue" ] ] = 0) do={
+ /system/scheduler/add name="\$FlushEmailQueue" interval=1s start-time=startup \
on-event=(":global FlushEmailQueue; \$FlushEmailQueue;");
}
}