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 [email protected] or file a JIRA ticket
with INFRA.
---