Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Kill couch_db_event with supervisor functions
Apparently gen_event ignores unknown kill messages so we'll force a
clean shutdown with superisor functions.
  • Loading branch information
davisp authored and rnewson committed Jul 30, 2014
1 parent 022af54 commit de231715e270d685389e0e8e79eed2715bc1e61c
Showing 1 changed file with 4 additions and 1 deletion.
@@ -126,7 +126,10 @@ watchdog() ->
Handlers = gen_event:which_handlers(couch_db_update),
case length(Handlers) > 0 of
true ->
exit(whereis(couch_db_update), force_upgrade);
supervisor:terminate_child(
couch_primary_services, couch_db_update_event),
supervisor:restart_child(
couch_primary_services, couch_db_update_event);
false ->
ok
end,

0 comments on commit de23171

Please sign in to comment.