Application hooks for gen_X modules.

28 views
Skip to first unread message

Emacs the Viking

unread,
Jan 12, 2015, 10:46:30 AM1/12/15
to chica...@googlegroups.com
Are there *standard* boss ways of implementing conventional gen_server and gen_fsm modules and having them initialised at startup time.

In other words, how do I manage non CB controllers as part of a larger application...is it easy or does it work the other way around in that I have to create an pplication of which the CB part is just part of a bigger project ?

Thanks,
Sean

David Welton

unread,
Jan 12, 2015, 10:52:47 AM1/12/15
to chica...@googlegroups.com
You can have other applications included as part of your release.
These will get started in the normal way. I'd suggest 'relx' as the
sane way to handle releases.

--
David N. Welton

http://www.welton.it/davidw/

http://www.dedasys.com/

Kai Janson

unread,
Jan 12, 2015, 4:43:12 PM1/12/15
to chica...@googlegroups.com
Hi,

You can add and start extra modules in the priv/init/<appname>_01_news.erl script.
If you need to stop a module a specific way then you can provide a shutdown sequence as well.

--Kai

Sent from my non-google-device
--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/2931d2d6-5c4d-4fff-add3-e06afe7dea0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

emacstheviking

unread,
Jan 12, 2015, 4:45:20 PM1/12/15
to chica...@googlegroups.com
Already figured it out thanks Kai!

I found the reference you made to Evans full post about how he changed it and why the files are _01 _02 etc. Makes sense and works just fine.

Thanks
Sean


kotedo

unread,
Jan 12, 2015, 4:47:09 PM1/12/15
to chica...@googlegroups.com
LOL!

I must have missed that post from Evan.

—Kai

Emacs the Viking

unread,
Jan 12, 2015, 6:41:18 PM1/12/15
to chica...@googlegroups.com
I stashed it in Evernote, so in case anybody is wondering what I am on about:


It explains neatly and concisely about the priv/init folder and how to make use of it.
Reply all
Reply to author
Forward
0 new messages