mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-10 10:04:28 +02:00
mod/notification-matrix: only flush queue if fully connected
The fetch command is not as reliable as it should be... Chances were that notifications were sent multiple times if stuck in background. Let's flush only if fully connected - and hope this fixes it.
This commit is contained in:
parent
d8d7ace5e5
commit
cf59e7c1a2
1 changed files with 6 additions and 0 deletions
|
@ -13,8 +13,14 @@
|
||||||
:set FlushMatrixQueue do={
|
:set FlushMatrixQueue do={
|
||||||
:global MatrixQueue;
|
:global MatrixQueue;
|
||||||
|
|
||||||
|
:global IsFullyConnected;
|
||||||
:global LogPrintExit2;
|
:global LogPrintExit2;
|
||||||
|
|
||||||
|
:if ([ $IsFullyConnected ] = false) do={
|
||||||
|
$LogPrintExit2 debug $0 ("System is not fully connected, not flushing.") false;
|
||||||
|
:return false;
|
||||||
|
}
|
||||||
|
|
||||||
:local AllDone true;
|
:local AllDone true;
|
||||||
:local QueueLen [ :len $MatrixQueue ];
|
:local QueueLen [ :len $MatrixQueue ];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue