mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
mod/notification-telegram: introduce $PurgeTelegramQueue
... to purge the queue and remove the scheduler.
This commit is contained in:
@@ -73,6 +73,11 @@ Place this before you call them:
|
||||
:global SendTelegram;
|
||||
:global SendNotification;
|
||||
|
||||
In case there is a situation when the queue needs to be purged there is a
|
||||
function available:
|
||||
|
||||
$PurgeTelegramQueue;
|
||||
|
||||
Tips & Tricks
|
||||
-------------
|
||||
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user