You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/01/17 22:50:36 UTC
[36/50] git commit: Use config app instead of couch_config
Use config app instead of couch_config
BugzID: 13179
Project: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/commit/78a23c5b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/tree/78a23c5b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/diff/78a23c5b
Branch: refs/heads/import
Commit: 78a23c5b7be77f67f6dd94028872245106c8ad25
Parents: 2b78ba0
Author: Adam Kocoloski <ad...@cloudant.com>
Authored: Wed Feb 27 09:53:11 2013 -0500
Committer: Adam Kocoloski <ad...@cloudant.com>
Committed: Wed Feb 27 09:53:11 2013 -0500
----------------------------------------------------------------------
src/fabric.erl | 2 +-
src/fabric_doc_attachments.erl | 4 ++--
src/fabric_doc_open_revs.erl | 8 ++++----
src/fabric_util.erl | 2 +-
src/fabric_view_all_docs.erl | 2 +-
5 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/78a23c5b/src/fabric.erl
----------------------------------------------------------------------
diff --git a/src/fabric.erl b/src/fabric.erl
index 6ce6f65..fe6bf6c 100644
--- a/src/fabric.erl
+++ b/src/fabric.erl
@@ -354,7 +354,7 @@ cleanup_index_files(DbName) ->
binary_to_list(couch_util:get_value(signature, Info))
end, [couch_doc:from_json_obj(DD) || DD <- DesignDocs]),
- FileList = filelib:wildcard([couch_config:get("couchdb", "view_index_dir"),
+ FileList = filelib:wildcard([config:get("couchdb", "view_index_dir"),
"/.shards/*/", couch_util:to_list(dbname(DbName)), ".[0-9]*_design/*"]),
DeleteFiles = if ActiveSigs =:= [] -> FileList; true ->
http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/78a23c5b/src/fabric_doc_attachments.erl
----------------------------------------------------------------------
diff --git a/src/fabric_doc_attachments.erl b/src/fabric_doc_attachments.erl
index c91995d..430ad27 100644
--- a/src/fabric_doc_attachments.erl
+++ b/src/fabric_doc_attachments.erl
@@ -102,12 +102,12 @@ middleman(Req, chunked) ->
Receiver = spawn(fun() -> couch_httpd:recv_chunked(Req,4096,RcvFun,ok) end),
% take requests from the DB writers and get data from the receiver
- N = erlang:list_to_integer(couch_config:get("cluster","n")),
+ N = erlang:list_to_integer(config:get("cluster","n")),
middleman_loop(Receiver, N, [], []);
middleman(Req, Length) ->
Receiver = spawn(fun() -> receive_unchunked_attachment(Req, Length) end),
- N = erlang:list_to_integer(couch_config:get("cluster","n")),
+ N = erlang:list_to_integer(config:get("cluster","n")),
middleman_loop(Receiver, N, [], []).
middleman_loop(Receiver, N, Counters0, ChunkList0) ->
http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/78a23c5b/src/fabric_doc_open_revs.erl
----------------------------------------------------------------------
diff --git a/src/fabric_doc_open_revs.erl b/src/fabric_doc_open_revs.erl
index 395789c..60f26e1 100644
--- a/src/fabric_doc_open_revs.erl
+++ b/src/fabric_doc_open_revs.erl
@@ -187,7 +187,7 @@ unstrip_not_found_missing([Else | Rest]) ->
[Else | unstrip_not_found_missing(Rest)].
all_revs_test() ->
- couch_config:start_link([]),
+ config:start_link([]),
meck:new(fabric),
meck:expect(fabric, dbname, fun(Name) -> Name end),
meck:expect(fabric, update_docs, fun(_, _, _) -> {ok, nil} end),
@@ -235,10 +235,10 @@ all_revs_test() ->
handle_message({ok, [Bar1]}, nil, State2)
),
meck:unload(fabric),
- couch_config:stop().
+ config:stop().
specific_revs_test() ->
- couch_config:start_link([]),
+ config:start_link([]),
meck:new(fabric),
meck:expect(fabric, dbname, fun(Name) -> Name end),
meck:expect(fabric, update_docs, fun(_, _, _) -> {ok, nil} end),
@@ -304,4 +304,4 @@ specific_revs_test() ->
handle_message({ok, [Foo2, Bar1, Baz2]}, nil, State2L)
),
meck:unload(fabric),
- couch_config:stop().
+ config:stop().
http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/78a23c5b/src/fabric_util.erl
----------------------------------------------------------------------
diff --git a/src/fabric_util.erl b/src/fabric_util.erl
index 391e174..0ff1735 100644
--- a/src/fabric_util.erl
+++ b/src/fabric_util.erl
@@ -50,7 +50,7 @@ recv(Workers, Keypos, Fun, Acc0) ->
rexi_utils:recv(Workers, Keypos, Fun, Acc0, request_timeout(), infinity).
request_timeout() ->
- case couch_config:get("fabric", "request_timeout", "60000") of
+ case config:get("fabric", "request_timeout", "60000") of
"infinity" -> infinity;
N -> list_to_integer(N)
end.
http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/78a23c5b/src/fabric_view_all_docs.erl
----------------------------------------------------------------------
diff --git a/src/fabric_view_all_docs.erl b/src/fabric_view_all_docs.erl
index b85b6c4..8a4ed84 100644
--- a/src/fabric_view_all_docs.erl
+++ b/src/fabric_view_all_docs.erl
@@ -153,7 +153,7 @@ merge_row(rev, Row, Rows) ->
lists:rkeymerge(#view_row.id, [Row], Rows).
all_docs_concurrency() ->
- Value = couch_config:get("fabric", "all_docs_concurrency", "10"),
+ Value = config:get("fabric", "all_docs_concurrency", "10"),
try
list_to_integer(Value)
catch _:_ ->