@@ -22,7 +22,7 @@ const replicate = (db, argv = {}) => {
2222 return new Promise ( ( resolve , reject ) => {
2323 if ( argv . progress || jsonOutput ) {
2424 const outputJson = ( id , json = false ) => {
25- process . stdout . write ( JSON . stringify ( { id : id , progress : db . _replicationInfo . progress , max : db . _replicationInfo . max } ) )
25+ process . stdout . write ( JSON . stringify ( { id : id , progress : db . replicationStatus . progress , max : db . replicationStatus . max } ) )
2626 process . stdout . write ( '\n' )
2727 }
2828
@@ -32,12 +32,12 @@ const replicate = (db, argv = {}) => {
3232 return
3333 }
3434
35- outputProgress ( 'Replicating' , id , db . _replicationInfo . progress , db . _replicationInfo . max , startTime )
35+ outputProgress ( 'Replicating' , id , db . replicationStatus . progress , db . replicationStatus . max , startTime )
3636 }
3737
3838 db . events . on ( 'replicate' , ( id ) => {
39- if ( db . _replicationInfo . max > latestProgress ) {
40- latestProgress = db . _replicationInfo . max
39+ if ( db . replicationStatus . max > latestProgress ) {
40+ latestProgress = db . replicationStatus . max
4141 output ( id )
4242 }
4343 } )
@@ -52,7 +52,7 @@ const replicate = (db, argv = {}) => {
5252 } )
5353
5454 if ( argv . progress ) {
55- outputProgress ( 'Replicating' , db . address . toString ( ) , db . _replicationInfo . progress , db . _replicationInfo . max , new Date ( ) . getTime ( ) )
55+ outputProgress ( 'Replicating' , db . address . toString ( ) , db . replicationStatus . progress , db . replicationStatus . max , new Date ( ) . getTime ( ) )
5656 } else if ( jsonOutput ) {
5757 // Output nothing
5858 } else {
0 commit comments