I am working on the implementation of a supervisor for the first time, and I am having problems that I cannot understand from the documentation. In particular, when I try to start my process using SlowRamp.flood , I get {:error, {:invalid_child_spec, []}} .
This is a very simple application and was created using the new version of slow_ramp --sup.
The main file in ./lib/slow_ramp.ex :
defmodule SlowRamp do use Application
My ./lib/SlowRamp/flood.ex function / file is in ./lib/SlowRamp/flood.ex and looks like this:
defmodule SlowRamp.Flood do def start_link do Task.start_link(fn -> start end) end defp start do receive do {:start, host, caller} -> send caller, System.cmd("cmd", ["opt"]) end end end
Any help would be greatly appreciated. Thanks!
source share