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 2020/09/30 22:11:21 UTC

[couchdb] 01/01: Add node and pid to _scheduler/jobs output

This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch add-node-and-pid-to-scheduler-jobs
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 471b8aeb10862d0434f1495a480d03b379467d90
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Wed Sep 30 18:10:10 2020 -0400

    Add node and pid to _scheduler/jobs output
    
    This is mainly for compatibility with CouchDB 3.x
    
    Ref: https://docs.couchdb.org/en/stable/api/server/common.html#scheduler-jobs
---
 src/couch_replicator/src/couch_replicator.erl | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/couch_replicator/src/couch_replicator.erl b/src/couch_replicator/src/couch_replicator.erl
index 8ab36e5..a690d37 100644
--- a/src/couch_replicator/src/couch_replicator.erl
+++ b/src/couch_replicator/src/couch_replicator.erl
@@ -438,7 +438,9 @@ job_ejson(#{} = JobData) ->
         ?STATE := State,
         ?STATE_INFO := Info0,
         ?JOB_HISTORY := History,
-        ?REP_STATS := Stats
+        ?REP_STATS := Stats,
+        ?REP_NODE := Node,
+        ?REP_PID := Pid
     } = JobData,
 
     #{
@@ -470,7 +472,9 @@ job_ejson(#{} = JobData) ->
         <<"info">> => Info,
         <<"user">> => User,
         <<"history">> => History1,
-        <<"start_time">> => StartISO8601
+        <<"start_time">> => StartISO8601,
+        <<"node">> => Node,
+        <<"pid">> => Pid
     }.