diff options
Diffstat (limited to 'lib/lsg/application.ex')
-rw-r--r-- | lib/lsg/application.ex | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/lsg/application.ex b/lib/lsg/application.ex index cdd7915..5dd9d9c 100644 --- a/lib/lsg/application.ex +++ b/lib/lsg/application.ex @@ -6,6 +6,9 @@ defmodule LSG.Application do def start(_type, _args) do import Supervisor.Spec + :ok = LSG.Matrix.setup() + :ok = LSG.TelegramRoom.setup() + # Define workers and child supervisors to be supervised children = [ # Start the endpoint when the application starts @@ -19,6 +22,7 @@ defmodule LSG.Application do {GenMagic.Pool, [name: LSG.GenMagic, pool_size: 2]}, #worker(LSG.Icecast, []), ] ++ LSG.IRC.application_childs + ++ LSG.Matrix.application_childs # See https://hexdocs.pm/elixir/Supervisor.html # for other strategies and supported options @@ -26,6 +30,8 @@ defmodule LSG.Application do sup = Supervisor.start_link(children, opts) start_telegram() spawn_link(fn() -> LSG.IRC.after_start() end) + spawn_link(fn() -> LSG.Matrix.after_start() end) + spawn_link(fn() -> LSG.TelegramRoom.after_start() end) sup end |