Loopback: Async boot scripts doc clarification

Created on 28 Sep 2016  路  4Comments  路  Source: strongloop/loopback

With multiple asynchronous boot scripts, is the server waiting for the first boot script (using alphabetical order) to call back before starting the next boot script ? Or is starting all of them at once, and waits for all to call back ?

I believe this is not documented, and IMO it could be an improvement to add it.

doc

Most helpful comment

pass the control back to the application

Is not very clear IMO. Your sentence @superkhau in the contrary is ideal, clarifies anything without doubts.

Boot scripts are processed alphabetically, one at a time (not in parallel) -- this applies to both sync and async boot scripts

All 4 comments

I believe it states that in this part:
https://docs.strongloop.com/display/public/LB/Defining+boot+scripts#Definingbootscripts-Asynchronousbootscripts

You must call the callback function when the script is finished to pass control back to the application.
so as per your question this is the answer: is the server waiting for the first boot script (using alphabetical order) to call back before starting the next boot script

@crandmck Any improvements to the wording we can make in the docs?

Boot scripts are processed alphabetically, one at a time (not in parallel) -- this applies to both sync and async boot scripts.

pass the control back to the application

Is not very clear IMO. Your sentence @superkhau in the contrary is ideal, clarifies anything without doubts.

Boot scripts are processed alphabetically, one at a time (not in parallel) -- this applies to both sync and async boot scripts

Clarified in http://loopback.io/doc/en/lb2/Defining-boot-scripts.html#boot-script-loading-order.
Thanks!

Was this page helpful?
0 / 5 - 0 ratings