couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beno...@apache.org
Subject [11/50] couch commit: updated refs/remotes/origin/import to 09c6556
Date Mon, 10 Feb 2014 20:05:11 GMT
Reimplement db created events


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/651e26f6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/651e26f6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/651e26f6

Branch: refs/remotes/origin/import
Commit: 651e26f6156a55b267d411d5be196ed3f4aa610c
Parents: ab02c8c
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Wed Jan 23 15:10:57 2013 -0600
Committer: Paul J. Davis <paul.joseph.davis@gmail.com>
Committed: Tue Feb 4 17:03:24 2014 -0600

----------------------------------------------------------------------
 src/couch_server.erl | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/651e26f6/src/couch_server.erl
----------------------------------------------------------------------
diff --git a/src/couch_server.erl b/src/couch_server.erl
index 40dc3f9..1c74456 100644
--- a/src/couch_server.erl
+++ b/src/couch_server.erl
@@ -251,6 +251,12 @@ open_async(Server, From, DbName, Filepath, Options) ->
     put({async_open, DbName}, now()),
     Opener = spawn_link(fun() ->
         Res = couch_db:start_link(DbName, Filepath, Options),
+        case {Res, lists:member(create, Options)} of
+            {{ok, _Db}, true} ->
+                couch_db_update_notifier:notify({created, DbName});
+            _ ->
+                ok
+        end,
         gen_server:call(Parent, {open_result, DbName, Res}, infinity),
         unlink(Parent)
     end),


Mime
View raw message