mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-16 07:47:52 +02:00
mod/notification-telegram: introduce $PurgeTelegramQueue
... to purge the queue and remove the scheduler.
This commit is contained in:
parent
0aeb34e5e9
commit
c37739c2f6
2 changed files with 14 additions and 0 deletions
|
@ -73,6 +73,11 @@ Place this before you call them:
|
||||||
:global SendTelegram;
|
:global SendTelegram;
|
||||||
:global SendNotification;
|
:global SendNotification;
|
||||||
|
|
||||||
|
In case there is a situation when the queue needs to be purged there is a
|
||||||
|
function available:
|
||||||
|
|
||||||
|
$PurgeTelegramQueue;
|
||||||
|
|
||||||
Tips & Tricks
|
Tips & Tricks
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
:global FlushTelegramQueue;
|
:global FlushTelegramQueue;
|
||||||
:global NotificationFunctions;
|
:global NotificationFunctions;
|
||||||
|
:global PurgeTelegramQueue;
|
||||||
:global SendTelegram;
|
:global SendTelegram;
|
||||||
:global SendTelegram2;
|
: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
|
# send notification via telegram - expects at least two string arguments
|
||||||
:set SendTelegram do={
|
:set SendTelegram do={
|
||||||
:global SendTelegram2;
|
:global SendTelegram2;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue