[erlang-questions] establishing preconditions at startup
Thu Oct 13 16:46:37 CEST 2016
I do it with application dependencies and calling the setup from an init
function of a gen_server. I don't know if this is considered wrong or not,
but I've never had any problems.
On Thu, Oct 13, 2016 at 5:33 PM, Garry Hodgson <garry@REDACTED>
> I'm working on an application whose startup phase relies on some
> potentially lengthy setup of tunnels and such before we can start up our
> ranch listeners and start regular communications. I've thought of a number
> of approaches (application dependencies, supervisors, deferred
> initialization using handle_info, etc) that could ensure this sequencing,
> but they feel awkward, like I'm working against the grain.
> So how do other people handle this? Is there canonical erlangy way to do
> it? I reflexively avoid doing long running things in otp callbacks, but I
> expect there are better and worse places/times to do this.
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions