# Is there an event which is raised when node-red finished deploying?

**URL:** <https://discourse.nodered.org/t/is-there-an-event-which-is-raised-when-node-red-finished-deploying/48015>\
**Category:** Developing Nodes\
**Created:** [4 July 2021 15:52 UTC](https://discourse.nodered.org/t/is-there-an-event-which-is-raised-when-node-red-finished-deploying/48015 "2021-07-04T15:52:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![windkh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/windkh/32/4713_2.png) [@windkh](https://discourse.nodered.org/u/windkh)\
**Post date:** [4 July 2021 15:52 UTC](https://discourse.nodered.org/t/is-there-an-event-which-is-raised-when-node-red-finished-deploying/48015/1 "2021-07-04T15:52:08Z")

</div>

I searched the forum but could not find anything that could solve my problem:

Use Case:  
I would like to do execute some code after all nodes in one of my libs were successfully initialized. All my nodes register themselves in a list and when the list  
is complete I want to to some checks and so on...

Question:  
Is there an event which is raised by node-red when the flows are fully deployed?

---

<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:** [4 July 2021 16:45 UTC](https://discourse.nodered.org/t/is-there-an-event-which-is-raised-when-node-red-finished-deploying/48015/2 "2021-07-04T16:45:30Z")

</div>

There is a flows:started event - but that is when the flows have all been told to start. Some nodes may do asynchronous work (eg connect to a remote database - or not) - so we can never be sure when something is "fully deployed".

---

<div class="post-metadata">

**Author:** ![windkh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/windkh/32/4713_2.png) [@windkh](https://discourse.nodered.org/u/windkh)\
**Post date:** [4 July 2021 17:04 UTC](https://discourse.nodered.org/t/is-there-an-event-which-is-raised-when-node-red-finished-deploying/48015/3 "2021-07-04T17:04:32Z")

</div>

Ah thanks for the hint. That would be completely ok as no async stuff is used in my use case.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [4 July 2021 21:05 UTC](https://discourse.nodered.org/t/is-there-an-event-which-is-raised-when-node-red-finished-deploying/48015/4 "2021-07-04T21:05:50Z")

</div>

There is also the "runtime-event" with an ID of "runtime-state". Though this appears to trigger twice.

I've just used it in uibuilder v4-beta to move the block of log information for uibuilder to a better place and only triggered after some other events have completed. I put a simple switch in place to only run it once:

> <https://github.com/TotallyInformation/node-red-contrib-uibuilder/blob/main/nodes/uibuilder.js#L150-L175>

---

<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:** [18 July 2021 21:06 UTC](https://discourse.nodered.org/t/is-there-an-event-which-is-raised-when-node-red-finished-deploying/48015/5 "2021-07-18T21:06:21Z")

</div>

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