From c37739c2f6b050c965e0fa734309e1ecbed90add Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Sun, 6 Aug 2023 16:26:22 +0200 Subject: mod/notification-telegram: introduce $PurgeTelegramQueue ... to purge the queue and remove the scheduler. --- mod/notification-telegram.rsc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mod') diff --git a/mod/notification-telegram.rsc b/mod/notification-telegram.rsc index 0ab1aa0..ea47b1a 100644 --- a/mod/notification-telegram.rsc +++ b/mod/notification-telegram.rsc @@ -8,6 +8,7 @@ :global FlushTelegramQueue; :global NotificationFunctions; +:global PurgeTelegramQueue; :global SendTelegram; :global SendTelegram2; @@ -162,6 +163,14 @@ } } +# purge the Telegram queue +:set PurgeTelegramQueue do={ + :global TelegramQueue; + + /system/scheduler/remove [ find where name="\$FlushTelegramQueue" ]; + :set TelegramQueue; +} + # send notification via telegram - expects at least two string arguments :set SendTelegram do={ :global SendTelegram2; -- cgit v1.2.3-70-g09d2