# Delay node with status information

**URL:** <https://discourse.nodered.org/t/delay-node-with-status-information/49221>\
**Category:** Feature Requests\
**Created:** [2 August 2021 16:26 UTC](https://discourse.nodered.org/t/delay-node-with-status-information/49221 "2021-08-02T16:26:27Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![rko](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rko/32/45807_2.png) [@rko](https://discourse.nodered.org/u/rko)\
**Post date:** [2 August 2021 16:26 UTC](https://discourse.nodered.org/t/delay-node-with-status-information/49221/1 "2021-08-02T16:26:27Z")

</div>

It would be helpful, if the `delay` node had a feature to receive the current status of the node. For example through a second status output.

One could check if the last message was a reset message or how many messages are currently queued up (as it is shown in the flow editor).

---

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [2 August 2021 16:29 UTC](https://discourse.nodered.org/t/delay-node-with-status-information/49221/2 "2021-08-02T16:29:57Z")

</div>

You could use the `status` node to receive all status changes of your `delay` node.

I think a reset message causes it to send an empty status, so that could be achievable as well.

Just try it out, if it works. 😉

---

<div class="post-metadata">

**Author:** ![rko](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rko/32/45807_2.png) [@rko](https://discourse.nodered.org/u/rko)\
**Post date:** [2 August 2021 16:38 UTC](https://discourse.nodered.org/t/delay-node-with-status-information/49221/3 "2021-08-02T16:38:44Z")

</div>

That's an interesting workaround, thanks. A reset would give something like this:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/b/1b2d0c81a10f0830eaaba30b29a959a735c687f0.png)

As for the queue information I would have to do some counting, which I am very bad at 😛

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [2 August 2021 18:19 UTC](https://discourse.nodered.org/t/delay-node-with-status-information/49221/4 "2021-08-02T18:19:01Z")

</div>

I thought as of Node-Red 2 it did report the depth as the status ?

---

<div class="post-metadata">

**Author:** ![rko](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rko/32/45807_2.png) [@rko](https://discourse.nodered.org/u/rko)\
**Post date:** [2 August 2021 19:00 UTC](https://discourse.nodered.org/t/delay-node-with-status-information/49221/5 "2021-08-02T19:00:25Z")

</div>

I have some problems with the `delay` node since I updated to `2.x`. Maybe it's just my installation.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [2 August 2021 19:20 UTC](https://discourse.nodered.org/t/delay-node-with-status-information/49221/6 "2021-08-02T19:20:34Z")

</div>

Such as ?

---

<div class="post-metadata">

**Author:** ![rko](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rko/32/45807_2.png) [@rko](https://discourse.nodered.org/u/rko)\
**Post date:** [2 August 2021 19:24 UTC](https://discourse.nodered.org/t/delay-node-with-status-information/49221/7 "2021-08-02T19:24:55Z")

</div>

Or maybe these are changes (didn't study the changelog). Reset is not displayed anymore as status after sending a reset msg. Also, I thought in previous versions the number showed the delay time, now it's number of messages in the queue.

---

<div class="post-metadata">

**Author:** ![rko](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rko/32/45807_2.png) [@rko](https://discourse.nodered.org/u/rko)\
**Post date:** [2 August 2021 19:27 UTC](https://discourse.nodered.org/t/delay-node-with-status-information/49221/8 "2021-08-02T19:27:32Z")

</div>

After thinking about this for a while, I would still like to have a way to "ask" a delay node about its status. The status node is firing too many messages and I am worried that I might run into performance problems because of that.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [2 August 2021 19:31 UTC](https://discourse.nodered.org/t/delay-node-with-status-information/49221/9 "2021-08-02T19:31:55Z")

</div>

Changing to depth was one of the breaking changes for 2.0. And reset now shows as depth 0. The sending of depth is actually itself rate limited to about 3 per second not every change so should be ok.

---

<div class="post-metadata">

**Author:** ![rko](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rko/32/45807_2.png) [@rko](https://discourse.nodered.org/u/rko)\
**Post date:** [2 August 2021 19:35 UTC](https://discourse.nodered.org/t/delay-node-with-status-information/49221/10 "2021-08-02T19:35:22Z")

</div>

Apologies but I don't understand what you mean by depth. Is there a description somewhere?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [2 August 2021 22:33 UTC](https://discourse.nodered.org/t/delay-node-with-status-information/49221/11 "2021-08-02T22:33:33Z")

</div>

Where you have “text”:0 above. That is the depth of the queue. How many msgs are currently stored.

---

<div class="post-metadata">

**Author:** ![rko](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rko/32/45807_2.png) [@rko](https://discourse.nodered.org/u/rko)\
**Post date:** [3 August 2021 05:03 UTC](https://discourse.nodered.org/t/delay-node-with-status-information/49221/12 "2021-08-03T05:03:54Z")

</div>

[Yes it seems to do that](https://github.com/node-red/node-red/blob/f1e7ec0c6bc33d4d0f6286012ef4d5aa817ac0b5/packages/node_modules/%40node-red/nodes/core/function/89-delay.js#L143). Aren't you one of the contributors? 😉

It's also nice to have the `msg.rate` option. I think this is new too?

What do you think about the feature request?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [2 October 2021 05:04 UTC](https://discourse.nodered.org/t/delay-node-with-status-information/49221/13 "2021-10-02T05:04:53Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
