Configuring `eredis_cluster` as a worker

55 views
Skip to first unread message

Srinivas JONNALAGADDA

unread,
Aug 26, 2016, 5:39:24 AM8/26/16
to elixir-lang-talk
Team,

        I am using `eredis_cluster` in my application.  `eredis_cluster` is, by itself, an application (with a `start/0` and no `start_link/0`).  Following its documentation, I have setup the configuration.  It works if it started manually as an application.

        But, my application needs `eredis_cluster` itself to be supervised.  How should I configure it as a supervised worker in my application?

        In general, how do I configure an application as a worker?  Thanks!

                                                             -- 0|0

Redvers Davies

unread,
Aug 26, 2016, 5:58:51 AM8/26/16
to elixir-l...@googlegroups.com
You wouldn't.  If it's an application, let it run as an application.

The BEAM managed applications, that's what it's best at.  The last thing you want to do it try and take over that role.

Perhaps instead we should help you work out why the application isn't starting for you?

--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/80097807-c1d1-4b3e-a565-4b1b22484559%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Srinivas JONNALAGADDA

unread,
Aug 26, 2016, 6:05:19 AM8/26/16
to elixir-lang-talk
        Thanks, Redvers, for the quick response.

On Friday, 26 August 2016 15:28:51 UTC+5:30, Redvers Davies wrote:
You wouldn't.  If it's an application, let it run as an application.

The BEAM managed applications, that's what it's best at.  The last thing you want to do it try and take over that role.

        I certainly do not want to do that! :-)
 
Perhaps instead we should help you work out why the application isn't starting for you?

        I should clarify that when I include `eredis_cluster` in the list of applications in `mix.exs`, it does get started properly.  However, when something goes wrong, and `eredis_cluster` crashes, it is not coming back up.  So, I thought that it should be made a worker under my application's supervisor.  Including it in the supervision tree did not work.  Hence my question!

                                                             -- 0|0
Reply all
Reply to author
Forward
0 new messages