Starting applications, supervisors and long lived processes in a ChicagoBoss project

59 views
Skip to first unread message

Juan Jose Comellas

unread,
May 30, 2012, 10:25:48 PM5/30/12
to chica...@googlegroups.com
Suppose I needed to start other applications that my code depends on in a ChicagoBoss project, how would I go about it? What is the correct place to do it? And what about my own supervisors or other long lived processes? Is there something like OTP's application:start/2 where I can start my own long-lived processes?

Where should I put the configuration that will feed an OTP application's environment (the app.config normally passed with the -config parameter)? Is boss.config the place for this too?

Thanks,

Juanjo



Kai Janson

unread,
May 30, 2012, 10:32:01 PM5/30/12
to chica...@googlegroups.com
Hi Juan,

You can add your additional application startup calls into

    priv/init/qr_01_news.erl

like this:

init() ->
    application:start(eunit),
    application:start(erlcron),
    .
    .
    .

or, if you like you can create more files in this very same directory and add your start/stop application calls in there.

See http://chicagoboss.org/api-news.html for details. (Section The *.news.erl startup script.)

—Kai

Evan Miller

unread,
May 30, 2012, 10:56:11 PM5/30/12
to chica...@googlegroups.com
Yes, in boss.config just do something like

[{boss, [ ... ]},
{my_application, [ ... ]},
{some_otp_applicaton, [ ... ]}
].

>
> Thanks,
>
> Juanjo
>
>
>



--
Evan Miller
http://www.evanmiller.org/
Reply all
Reply to author
Forward
0 new messages