[erlang-questions] establishing preconditions at startup
Metin Akat
akat.metin@REDACTED
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>
wrote:
> 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.
>
> Thanks
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20161013/297fe20f/attachment.htm>
More information about the erlang-questions
mailing list