mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
delay node - change lifo property to toFront
add info to sidebar add tests
This commit is contained in:
@@ -253,7 +253,7 @@ module.exports = function(RED) {
|
||||
if ((max_msgs > 0) && (node.buffer.length >= max_msgs)) {
|
||||
node.buffer = [];
|
||||
node.error(RED._("delay.errors.too-many"), msg);
|
||||
} else if (msg.lifo) {
|
||||
} else if (msg.toFront === true) {
|
||||
node.buffer.unshift({msg: m, send: send, done: done});
|
||||
node.reportDepth();
|
||||
} else {
|
||||
|
@@ -35,6 +35,11 @@
|
||||
<dd>If the received message has this property set to a numeric value then that many messages
|
||||
will be released immediately. If set to any other type (e.g. boolean), then all
|
||||
outstanding messages held by the node are sent immediately.</dd>
|
||||
<dt class="optional">toFront</dt>
|
||||
<dd>When in rate limit mode, if the received message has this property set to boolean <code>true</code>,
|
||||
then the message is pushed to the front of the queue and will be released next.
|
||||
This can be used in combination with <code>msg.flush=1</code> to resend immediately.
|
||||
</dd>
|
||||
</dl>
|
||||
<h3>Details</h3>
|
||||
<p>When configured to delay messages, the delay interval can be a fixed value,
|
||||
|
Reference in New Issue
Block a user