diff options
Diffstat (limited to 'apps/couch/src/couch_db_update_notifier_sup.erl')
-rw-r--r-- | apps/couch/src/couch_db_update_notifier_sup.erl | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/couch/src/couch_db_update_notifier_sup.erl b/apps/couch/src/couch_db_update_notifier_sup.erl index 4d730fc7..e7cc16c1 100644 --- a/apps/couch/src/couch_db_update_notifier_sup.erl +++ b/apps/couch/src/couch_db_update_notifier_sup.erl @@ -22,16 +22,14 @@ -behaviour(supervisor). --export([start_link/0,init/1]). +-export([start_link/0, init/1, config_change/3]). start_link() -> supervisor:start_link({local, couch_db_update_notifier_sup}, couch_db_update_notifier_sup, []). init([]) -> - ok = couch_config:register( - fun("update_notification", Key, Value) -> reload_config(Key, Value) end - ), + ok = couch_config:register(fun ?MODULE:config_change/3), UpdateNotifierExes = couch_config:get("update_notification"), @@ -48,7 +46,7 @@ init([]) -> %% @doc when update_notification configuration changes, terminate the process %% for that notifier and start a new one with the updated config -reload_config(Id, Exe) -> +config_change("update_notification", Id, Exe) -> ChildSpec = { Id, {couch_db_update_notifier, start_link, [Exe]}, |