local-cluster icon indicating copy to clipboard operation
local-cluster copied to clipboard

How to start a supervisor in the slave nodes?

Open edisonywh opened this issue 2 years ago • 0 comments

I am working on a Spawnfest idea and I am using LocalCluster to test the distribution. If I start my supervision tree implicitly (with the :mod key), then Application.ensure_started works and LocalCluster's doc document as much (started applications are replicated to slave nodes).

But how does it work if I don't want to start my app up implicitly? Instead of starting it implicitly, I am requiring users to put it in their supervision tree. In my test, I can manually call start_link to start it which is pretty neat, but when LocalCluster is involved, I am not able to get these supervision tree started there.

I tried to do a :rpc.call(node1, MySupervisor, :start_link, []) but that doesn't work either, is it not possible?

edisonywh avatar Sep 19 '21 19:09 edisonywh