Made a more proper supervisor tree for the app

This commit is contained in:
2026-01-31 00:37:23 +02:00
parent dd134a632c
commit 993bc51240
4 changed files with 54 additions and 29 deletions
+1 -4
View File
@@ -8,13 +8,10 @@ defmodule NeonVertigoService do
@impl true
def start(_start_type, _start_args) do
children = [
# %{id: :emqtt, start: {:emqtt, :start_link, [[{:owner, self()}, {:username, "artemis"}, {:password, "artemis"}]]}},
{NeonVertigoService.Mqtt, [{}]}
NeonVertigoService.Mqtt.Supervisor,
]
{:ok, _spid} = Supervisor.start_link(children, strategy: :one_for_one)
# {:ok, mqtt_pid} = Supervisor.start_child(spid, %{id: :emqtt, start: {:emqtt, :start_link, [[{:owner, self()}, {:username, "artemis"}, {:password, "artemis"}]]}})
# {:ok, _} = Supervisor.start_child(spid, {NeonVertigoService.Mqtt, [{mqtt_pid}]})
end
end