aboutsummaryrefslogtreecommitdiffstats
path: root/mod/notification-matrix.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-matrix.rsc
parent0d530294f5f0608114c8f0cd409f0041bb2c1b74 (diff)
parent8c8f834179f0ab618f031ec50739bbafd4c4261e (diff)
Merge branch 'scheduler' into nextrouteros-7.13beta1-1
Diffstat (limited to 'mod/notification-matrix.rsc')
-rw-r--r--mod/notification-matrix.rsc10
1 files changed, 5 insertions, 5 deletions
diff --git a/mod/notification-matrix.rsc b/mod/notification-matrix.rsc
index a8983a7..378faab 100644
--- a/mod/notification-matrix.rsc
+++ b/mod/notification-matrix.rsc
@@ -30,7 +30,7 @@
:local AllDone true;
:local QueueLen [ :len $MatrixQueue ];
- :if ([ :len [ /system/scheduler/find where name=$0 ] ] > 0 && $QueueLen = 0) do={
+ :if ([ :len [ /system/scheduler/find where name="_FlushMatrixQueue" ] ] > 0 && $QueueLen = 0) do={
$LogPrintExit2 warning $0 ("Flushing Matrix messages from scheduler, but queue is empty.") false;
}
@@ -52,7 +52,7 @@
}
:if ($AllDone = true && $QueueLen = [ :len $MatrixQueue ]) do={
- /system/scheduler/remove [ find where name=$0 ];
+ /system/scheduler/remove [ find where name="_FlushMatrixQueue" ];
:set MatrixQueue;
}
}
@@ -147,8 +147,8 @@
:set ($MatrixQueue->[ :len $MatrixQueue ]) { room=$Room; \
accesstoken=$AccessToken; homeserver=$HomeServer; \
plain=$Plain; formatted=$Formatted };
- :if ([ :len [ /system/scheduler/find where name="\$FlushMatrixQueue" ] ] = 0) do={
- /system/scheduler/add name="\$FlushMatrixQueue" interval=1m start-time=startup \
+ :if ([ :len [ /system/scheduler/find where name="_FlushMatrixQueue" ] ] = 0) do={
+ /system/scheduler/add name="_FlushMatrixQueue" interval=1m start-time=startup \
on-event=(":global FlushMatrixQueue; \$FlushMatrixQueue;");
}
}
@@ -158,7 +158,7 @@
:set PurgeMatrixQueue do={
:global MatrixQueue;
- /system/scheduler/remove [ find where name="\$FlushMatrixQueue" ];
+ /system/scheduler/remove [ find where name="_FlushMatrixQueue" ];
:set MatrixQueue;
}