Skip to content
Permalink
Browse files
Merge pull request #1 from cloudant/13179-config-refactor
Allow multiple listeners per callback module
  • Loading branch information
kocolosk committed Feb 27, 2013
2 parents 21dd193 + 81d558e commit 35b8b2dd3ecf5024b247a77a5af6450cdbe522db
Showing 1 changed file with 5 additions and 1 deletion.
@@ -4,6 +4,7 @@

%% Public interface
-export([start/2]).
-export([start/3]).

-export([behaviour_info/1]).

@@ -17,7 +18,10 @@ behaviour_info(_) ->
undefined.

start(Module, State) ->
gen_event:add_sup_handler(config_event, {?MODULE, Module}, {Module, State}).
start(Module, Module, State).

start(Module, Id, State) ->
gen_event:add_sup_handler(config_event, {?MODULE, Id}, {Module, State}).

init({Module, State}) ->
{ok, {Module, State}}.

0 comments on commit 35b8b2d

Please sign in to comment.