[WIP] Add an event for each updated design doc This sends an event for each design doc so we can include the document id.
Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/439db650 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/439db650 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/439db650 Branch: refs/heads/windsor-merge Commit: 439db650336a7b7b71ff60d150865341efdd162a Parents: 5a2da10 Author: Paul J. Davis <[email protected]> Authored: Thu Aug 7 13:34:49 2014 -0500 Committer: Robert Newson <[email protected]> Committed: Tue Aug 26 10:42:38 2014 +0100 ---------------------------------------------------------------------- src/couch_db_updater.erl | 7 +++++++ 1 file changed, 7 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/439db650/src/couch_db_updater.erl ---------------------------------------------------------------------- diff --git a/src/couch_db_updater.erl b/src/couch_db_updater.erl index 504c21e..2c1e808 100644 --- a/src/couch_db_updater.erl +++ b/src/couch_db_updater.erl @@ -289,6 +289,13 @@ handle_info({update_docs, Client, GroupedDocs, NonRepDocs, MergeConflicts, [catch(ClientPid ! {done, self()}) || ClientPid <- Clients], Db3 = case length(UpdatedDDocIds) > 0 of true -> + % Ken and ddoc_cache are the only things that + % use the unspecified ddoc_updated message. We + % should update them to use the new message per + % ddoc. + lists:foreach(fun(DDocId) -> + couch_event:notify(Db2#db.name, {ddoc_updated, DDocId}) + end, UpdatedDDocIds), couch_event:notify(Db2#db.name, ddoc_updated), ddoc_cache:evict(Db2#db.name, UpdatedDDocIds), refresh_validate_doc_funs(Db2);
