From 95fc775349be63fce7b504ef735f90071fd1db0e Mon Sep 17 00:00:00 2001 From: Alek Ratzloff Date: Sun, 14 Jun 2020 16:47:44 -0400 Subject: [PATCH] Update main supervisor to only start the IRC connection if IEx is *not* running Signed-off-by: Alek Ratzloff --- lib/supervisor.ex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/supervisor.ex b/lib/supervisor.ex index 1b89d57..e1af38a 100644 --- a/lib/supervisor.ex +++ b/lib/supervisor.ex @@ -16,8 +16,9 @@ defmodule Omnibot.Supervisor do {Task.Supervisor, name: Omnibot.RouterSupervisor, strategy: :one_for_one}, {Omnibot.State, cfg: cfg, name: Omnibot.State}, {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?