couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Norman Barker" <norman.bar...@gmail.com>
Subject erlang notifiers and couchdb
Date Tue, 06 Jan 2009 23:27:38 GMT
Hi,

I have create an erlang module called couch_db_update_my_notifier
which is very similar to couch_db_update_notifier and just prints out
events as they are received to stdout.

I try to register this module as an event handler as follows within the module

start_link(Exec) ->
   io:format("***StartLink***"),
   couch_event_sup:start_link(couch_db_update,
{couch_db_update_my_notifier, make_ref()},  Exec).

which is how it is recommended in couch_event_sup.erl

Problem is how do I actually load couch_db_update_my_notifier and get
start_link invoked, it isn't a daemon, just another listener, and the
updatenotification handler in the ini file is for system processes.

Is there a way to do this (easily)?  I am a newb at erlang and am
writing these modules to find my way around the code.  Having multiple
listeners to events is something I will want to have eventually hence
why I am trying this.  My aim is to do this in Erlang, I know it can
be done with _external.

thanks,

Norman

Mime
View raw message