diff options
author | Christian Hesse <mail@eworm.de> | 2023-11-14 22:35:23 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2023-11-14 22:35:23 +0100 |
commit | 75c41501c270a4e6fd2db34323f38e12cfdf86d9 (patch) | |
tree | d1675a9afe2ecf6963a5cf4a8b86b58504a788bf /mod/notification-ntfy.rsc | |
parent | 5c2454be8b767550251172c7b234585de1ded268 (diff) |
mod/notification-ntfy: rename scheduler
Diffstat (limited to 'mod/notification-ntfy.rsc')
-rw-r--r-- | mod/notification-ntfy.rsc | 10 |
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; } |