aboutsummaryrefslogtreecommitdiffstats
path: root/mod/notification-ntfy.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-11-14 22:36:58 +0100
committerGravatar Christian Hesse <mail@eworm.de>2023-11-14 22:36:58 +0100
commit3aec5d70c628003634fc413cdb00b2e1e0c9fca5 (patch)
tree1f00be1798a0a39e578f6f0af1d68bc68cd16d9d /mod/notification-ntfy.rsc
parent0d530294f5f0608114c8f0cd409f0041bb2c1b74 (diff)
parent8c8f834179f0ab618f031ec50739bbafd4c4261e (diff)
Merge branch 'scheduler' into nextrouteros-7.13beta1-1
Diffstat (limited to 'mod/notification-ntfy.rsc')
-rw-r--r--mod/notification-ntfy.rsc10
1 files changed, 5 insertions, 5 deletions
diff --git a/mod/notification-ntfy.rsc b/mod/notification-ntfy.rsc
index e2fc558..5c0e9e5 100644
--- a/mod/notification-ntfy.rsc
+++ b/mod/notification-ntfy.rsc
@@ -28,7 +28,7 @@
:local AllDone true;
:local QueueLen [ :len $NtfyQueue ];
- :if ([ :len [ /system/scheduler/find where name=$0 ] ] > 0 && $QueueLen = 0) do={
+ :if ([ :len [ /system/scheduler/find where name="_FlushNtfyQueue" ] ] > 0 && $QueueLen = 0) do={
$LogPrintExit2 warning $0 ("Flushing Ntfy messages from scheduler, but queue is empty.") false;
}
@@ -46,7 +46,7 @@
}
:if ($AllDone = true && $QueueLen = [ :len $NtfyQueue ]) do={
- /system/scheduler/remove [ find where name=$0 ];
+ /system/scheduler/remove [ find where name="_FlushNtfyQueue" ];
:set NtfyQueue;
}
}
@@ -103,8 +103,8 @@
"This message was queued since " . [ /system/clock/get date ] . " " . \
[ /system/clock/get time ] . " and may be obsolete.");
:set ($NtfyQueue->[ :len $NtfyQueue ]) { url=$Url; headers=$Headers; text=$Text };
- :if ([ :len [ /system/scheduler/find where name="\$FlushNtfyQueue" ] ] = 0) do={
- /system/scheduler/add name="\$FlushNtfyQueue" interval=1m start-time=startup \
+ :if ([ :len [ /system/scheduler/find where name="_FlushNtfyQueue" ] ] = 0) do={
+ /system/scheduler/add name="_FlushNtfyQueue" interval=1m start-time=startup \
on-event=(":global FlushNtfyQueue; \$FlushNtfyQueue;");
}
}
@@ -114,7 +114,7 @@
:set PurgeNtfyQueue do={
:global NtfyQueue;
- /system/scheduler/remove [ find where name="\$FlushNtfyQueue" ];
+ /system/scheduler/remove [ find where name="_FlushNtfyQueue" ];
:set NtfyQueue;
}