aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2022-09-15 21:59:06 +0200
committerGravatar Christian Hesse <mail@eworm.de>2022-09-15 22:25:59 +0200
commit47e4f292cba0059f55eb7e3aec1ca0d237ecf4b3 (patch)
tree561ed4babbb42341a9b2ca5cd884d9fc4c2d0597 /mod
parent3f92edb5c1a5415de5e9ebfd4a5139cb687d3956 (diff)
mod/notification-telegram: $FlushTelegramQueue: use $0 for scheduler name
Diffstat (limited to 'mod')
-rw-r--r--mod/notification-telegram8
1 files changed, 4 insertions, 4 deletions
diff --git a/mod/notification-telegram b/mod/notification-telegram
index 8c4cd65..849740b 100644
--- a/mod/notification-telegram
+++ b/mod/notification-telegram
@@ -23,7 +23,7 @@
:local AllDone true;
:local QueueLen [ :len $TelegramQueue ];
- :if ([ :len [ /system/scheduler/find where name="FlushTelegramQueue" ] ] > 0 && $QueueLen = 0) do={
+ :if ([ :len [ /system/scheduler/find where name=$0 ] ] > 0 && $QueueLen = 0) do={
$LogPrintExit2 warning $0 ("Flushing Telegram messages from scheduler, but queue is empty.") false;
}
@@ -45,7 +45,7 @@
}
:if ($AllDone = true && $QueueLen = [ :len $TelegramQueue ]) do={
- /system/scheduler/remove [ find where name="FlushTelegramQueue" ];
+ /system/scheduler/remove [ find where name=$0 ];
:set TelegramQueue;
}
}
@@ -146,8 +146,8 @@
" " . [ /system/clock/get time ] . " and may be obsolete.") "plain" ]) ]);
:set ($TelegramQueue->[ :len $TelegramQueue ]) { chatid=$ChatId; tokenid=$TokenId;
parsemode=$ParseMode; text=$Text; silent=($Notification->"silent") };
- :if ([ :len [ /system/scheduler/find where name="FlushTelegramQueue" ] ] = 0) do={
- /system/scheduler/add name=FlushTelegramQueue interval=1m start-time=startup \
+ :if ([ :len [ /system/scheduler/find where name="\$FlushTelegramQueue" ] ] = 0) do={
+ /system/scheduler/add name="\$FlushTelegramQueue" interval=1m start-time=startup \
on-event=(":global FlushTelegramQueue; \$FlushTelegramQueue;");
}
}