couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnewson <...@git.apache.org>
Subject [GitHub] couchdb-fabric pull request: Add system db handlers to fabric_doc_...
Date Fri, 12 Dec 2014 11:14:39 GMT
Github user rnewson commented on a diff in the pull request:

    https://github.com/apache/couchdb-fabric/pull/6#discussion_r21738688
  
    --- Diff: src/fabric_doc_update.erl ---
    @@ -97,6 +98,28 @@ handle_message({not_found, no_db_file} = X, Worker, Acc0) ->
     handle_message({bad_request, Msg}, _, _) ->
         throw({bad_request, Msg}).
     
    +before_doc_update(DbName, Docs) ->
    +    case {is_replicator_db(DbName), is_users_db(DbName)} of
    +        {true, _} ->
    +            lists:map(fun couch_replicator_manager:before_doc_update/1, Docs);
    +        {_, true} ->
    +            lists:map(fun couch_users_db:before_doc_update/1, Docs);
    +        _ ->
    +            Docs
    +    end.
    +
    +is_replicator_db(DbName) ->
    --- End diff --
    
    noting that we have this in couch_replicator_manager but I can't think of a clean dedupe.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message