aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-11-14 22:35:38 +0100
committerGravatar Christian Hesse <mail@eworm.de>2023-11-14 22:35:38 +0100
commit8c8f834179f0ab618f031ec50739bbafd4c4261e (patch)
tree1f00be1798a0a39e578f6f0af1d68bc68cd16d9d
parent75c41501c270a4e6fd2db34323f38e12cfdf86d9 (diff)
mod/notification-telegram: rename scheduler
-rw-r--r--mod/notification-telegram.rsc10
1 files changed, 5 insertions, 5 deletions
diff --git a/mod/notification-telegram.rsc b/mod/notification-telegram.rsc
index b5729a4..66be7d3 100644
--- a/mod/notification-telegram.rsc
+++ b/mod/notification-telegram.rsc
@@ -29,7 +29,7 @@
:local AllDone true;
:local QueueLen [ :len $TelegramQueue ];
- :if ([ :len [ /system/scheduler/find where name=$0 ] ] > 0 && $QueueLen = 0) do={
+ :if ([ :len [ /system/scheduler/find where name="_FlushTelegramQueue" ] ] > 0 && $QueueLen = 0) do={
$LogPrintExit2 warning $0 ("Flushing Telegram messages from scheduler, but queue is empty.") false;
}
@@ -51,7 +51,7 @@
}
:if ($AllDone = true && $QueueLen = [ :len $TelegramQueue ]) do={
- /system/scheduler/remove [ find where name=$0 ];
+ /system/scheduler/remove [ find where name="_FlushTelegramQueue" ];
:set TelegramQueue;
}
}
@@ -155,8 +155,8 @@
" " . [ /system/clock/get time ] . " and may be obsolete.") "plain" ]) ]);
:set ($TelegramQueue->[ :len $TelegramQueue ]) { chatid=$ChatId; tokenid=$TokenId;
text=$Text; silent=($Notification->"silent"); replyto=($Notification->"replyto") };
- :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;");
}
}
@@ -166,7 +166,7 @@
:set PurgeTelegramQueue do={
:global TelegramQueue;
- /system/scheduler/remove [ find where name="\$FlushTelegramQueue" ];
+ /system/scheduler/remove [ find where name="_FlushTelegramQueue" ];
:set TelegramQueue;
}