Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init scripts are getting started after webserver #658

Open
brigadier opened this issue Oct 21, 2016 · 0 comments
Open

init scripts are getting started after webserver #658

brigadier opened this issue Oct 21, 2016 · 0 comments

Comments

@brigadier
Copy link
Contributor

At the moment CB starts webserver, and then runs init scripts from the app. I propose changing of this order and run init scripts before starting web server, because it's usually the handlers access data and processes initialised by the init scripts, not vice versa.

This call

Pid = boss_web_controller_init:init_webserver(
                                   ThisNode, MasterNode, SSLEnable,
                                   SSLOptions, ServicesSupPid, ServerConfig),

would be moved from init of the boss_web-controller.erl to handle_info(timeout, after the boss_web_controller_util:start_boss_applications. Other initialization remains where it is in the init, and the data required by init_webserver gets passed via #state.
I tried it in my project and it works. Should I do pool request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant