diff options
author | Christian Hesse <mail@eworm.de> | 2021-04-29 09:12:17 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2021-04-29 09:12:17 +0200 |
commit | 5d973a095a63751c8707685c603d672b8101c44d (patch) | |
tree | 3c97af1c1c4e30224e162d8b5d3cec9f591d4f2e /global-functions | |
parent | da877612209b217fdfd5429889b6d7284bfd10a5 (diff) |
global-functions: $FlushEmailQueue: try to avoid running simultaneously
We can not check the status for a *specific* mail, so running simultaneously
is a problem. Let's increase the interval to the number of queue items -
and hope it helps. Decrease when done.
Diffstat (limited to 'global-functions')
-rw-r--r-- | global-functions | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/global-functions b/global-functions index ff16076..d048748 100644 --- a/global-functions +++ b/global-functions @@ -339,7 +339,7 @@ $LogPrintExit2 warning $0 ("Flushing E-Mail messages from scheduler, but queue is empty.") false; } - / system scheduler set interval=1m [ find where name="FlushEmailQueue" interval=1s ]; + / system scheduler set interval=($QueueLen . "m") [ find where name="FlushEmailQueue" ]; :foreach Id,Message in=$EmailQueue do={ :if ([ :typeof $Message ] = "array" ) do={ @@ -364,6 +364,8 @@ :if ($AllDone = true && $QueueLen = [ :len $EmailQueue ]) do={ / system scheduler remove [ find where name="FlushEmailQueue" ]; :set EmailQueue; + } else={ + / system scheduler set interval=1m [ find where name="FlushEmailQueue" ]; } } |