mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-04-16 18:19:36 +00:00
mod/notification-email: suppress another racy condition
This commit is contained in:
parent
2567c332de
commit
fa16e79746
1 changed files with 8 additions and 3 deletions
|
|
@ -64,9 +64,14 @@
|
||||||
comment="Doing initial checks..." on-event=(":global FlushEmailQueue; \$FlushEmailQueue;");
|
comment="Doing initial checks..." on-event=(":global FlushEmailQueue; \$FlushEmailQueue;");
|
||||||
}
|
}
|
||||||
|
|
||||||
:if (([ /system/scheduler/get [ find where name="_FlushEmailQueue" ] ]->"interval") < 1m) do={
|
:do {
|
||||||
/system/scheduler/set interval=1m comment="Doing initial checks..." \
|
:if (([ /system/scheduler/get [ find where name="_FlushEmailQueue" ] ]->"interval") < 1m) do={
|
||||||
[ find where name="_FlushEmailQueue" ];
|
/system/scheduler/set interval=1m comment="Doing initial checks..." \
|
||||||
|
[ find where name="_FlushEmailQueue" ];
|
||||||
|
}
|
||||||
|
} on-error={
|
||||||
|
$LogPrint debug $0 ("The scheduler is gone, aborting.");
|
||||||
|
:return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ /tool/e-mail/get last-status ] = "in-progress") do={
|
:if ([ /tool/e-mail/get last-status ] = "in-progress") do={
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue