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/18 06:29:13 UTC
[couchdb] 04/04: [fixup] add comment about sort order in
_scheduler/jobs handler
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
commit 3193997248167bfd0bfef11dfaac88f7f29ee301
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Tue Apr 18 02:27:04 2017 -0400
[fixup] add comment about sort order in _scheduler/jobs handler
---
src/couch_replicator/src/couch_replicator_httpd.erl | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/couch_replicator/src/couch_replicator_httpd.erl b/src/couch_replicator/src/couch_replicator_httpd.erl
index 173033f..364d098 100644
--- a/src/couch_replicator/src/couch_replicator_httpd.erl
+++ b/src/couch_replicator/src/couch_replicator_httpd.erl
@@ -42,6 +42,8 @@ handle_scheduler_req(#httpd{method='GET', path_parts=[_,<<"jobs">>]}=Req) ->
infinity),
{Replies, _BadNodes} = rpc:multicall(couch_replicator_scheduler, jobs, []),
Flatlist = lists:concat(Replies),
+ % couch_replicator_scheduler:job_ejson/1 guarantees {id, Id} to be the
+ % the first item in the list
Sorted = lists:sort(fun({[{id,A}|_]},{[{id,B}|_]}) -> A =< B end, Flatlist),
Total = length(Sorted),
Offset = min(Skip, Total),
--
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.