diff options
author | kballou <kballou@devnulllabs.io> | 2014-10-20 18:56:23 -0600 |
---|---|---|
committer | kballou <kballou@devnulllabs.io> | 2014-10-20 18:56:23 -0600 |
commit | 5ba91fecec283003690072773638f2f143a2b0fa (patch) | |
tree | 057a1d695256043546ce652f9419f23f2100ca22 /lib/poolparty.ex | |
parent | 482e23b272bbb5221e09634c16ab0be9edd40592 (diff) | |
download | poolparty-5ba91fecec283003690072773638f2f143a2b0fa.tar.gz poolparty-5ba91fecec283003690072773638f2f143a2b0fa.tar.xz |
Add event manager and event notification
The PoolParty module was turned into an application that creates a generic
genEvent server, passing it to the supervisor. The supervisor, in turn,
distributes the genevent server to all child processes, etc.
This allows all processes to send events to the manager for logging, etc.
Diffstat (limited to 'lib/poolparty.ex')
-rw-r--r-- | lib/poolparty.ex | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/poolparty.ex b/lib/poolparty.ex index 293f579..4cc0430 100644 --- a/lib/poolparty.ex +++ b/lib/poolparty.ex @@ -1,2 +1,10 @@ defmodule PoolParty do + use Application + require Logger + + def start(_type, _args) do + Logger.debug("[#{__MODULE__}]: Starting a Pool Party!") + {:ok, event_manager} = GenEvent.start_link() + PoolParty.Supervisor.start_link(event_manager) + end end |