You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2017/04/14 19:13:36 UTC
[couchdb] branch 63012-scheduler updated: [fixup] use total ->
total_rows in API
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch 63012-scheduler
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/63012-scheduler by this push:
new 9c8db04 [fixup] use total -> total_rows in API
9c8db04 is described below
commit 9c8db044473bb23975fc49e181126e209788e8e0
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Fri Apr 14 15:13:27 2017 -0400
[fixup] use total -> total_rows in API
---
src/chttpd/src/chttpd_misc.erl | 2 +-
src/couch_replicator/src/couch_replicator_httpd.erl | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/chttpd/src/chttpd_misc.erl b/src/chttpd/src/chttpd_misc.erl
index cc51bee..c9e7a24 100644
--- a/src/chttpd/src/chttpd_misc.erl
+++ b/src/chttpd/src/chttpd_misc.erl
@@ -168,7 +168,7 @@ handle_scheduler_req(#httpd{method='GET', path_parts=[_,<<"jobs">>]}=Req) ->
Offset = min(Skip, Total),
Sublist = lists:sublist(Sorted, Offset+1, Limit),
Sublist1 = [update_db_name(Task) || Task <- Sublist],
- send_json(Req, {[{total, Total}, {offset, Offset}, {jobs, Sublist1}]});
+ send_json(Req, {[{total_rows, Total}, {offset, Offset}, {jobs, Sublist1}]});
handle_scheduler_req(#httpd{method='GET', path_parts=[_,<<"jobs">>,JobId]}=Req) ->
case couch_replicator:job(JobId) of
{ok, JobInfo} ->
diff --git a/src/couch_replicator/src/couch_replicator_httpd.erl b/src/couch_replicator/src/couch_replicator_httpd.erl
index 834524d..96a88cb 100644
--- a/src/couch_replicator/src/couch_replicator_httpd.erl
+++ b/src/couch_replicator/src/couch_replicator_httpd.erl
@@ -73,7 +73,7 @@ docs_cb({meta, Meta}, #vacc{meta_sent=false, row_sent=false}=Acc) ->
% Sending metadata as we've not sent it or any row yet
Parts = case couch_util:get_value(total, Meta) of
undefined -> [];
- Total -> [io_lib:format("\"total\":~p", [adjust_total(Total)])]
+ Total -> [io_lib:format("\"total_rows\":~p", [adjust_total(Total)])]
end ++ case couch_util:get_value(offset, Meta) of
undefined -> [];
Offset -> [io_lib:format("\"offset\":~p", [Offset])]
--
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <co...@couchdb.apache.org>'].