Update main supervisor to only start the IRC connection if IEx is *not* running

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2020-06-14 16:47:44 -04:00
parent f12bc13e13
commit 95fc775349

View File

@@ -16,8 +16,9 @@ defmodule Omnibot.Supervisor do
{Task.Supervisor, name: Omnibot.RouterSupervisor, strategy: :one_for_one}, {Task.Supervisor, name: Omnibot.RouterSupervisor, strategy: :one_for_one},
{Omnibot.State, cfg: cfg, name: Omnibot.State}, {Omnibot.State, cfg: cfg, name: Omnibot.State},
{Omnibot.ModuleSupervisor, cfg: cfg, name: Omnibot.ModuleSupervisor}, {Omnibot.ModuleSupervisor, cfg: cfg, name: Omnibot.ModuleSupervisor},
{Omnibot.Irc, name: Omnibot.Irc}, ] ++ unless IEx.started?(),
] do: [{Omnibot.Irc, name: Omnibot.Irc}],
else: []
# TODO : how to handle config reloading? # TODO : how to handle config reloading?