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:40:31 UTC

[couchdb] branch main updated: 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 main
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to refs/heads/main by this push:
     new f143beb  Add node and pid to _scheduler/jobs output
f143beb is described below

commit f143beb96546931314fe636cc485b1d4c84f0f4a
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
     }.