Skip to content

Commit

Permalink
CON-368 Fix sync duration logging bug #3763
Browse files Browse the repository at this point in the history
  • Loading branch information
SidSethi authored Aug 25, 2022
1 parent fe85228 commit 0b4d837
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions creator-node/src/services/sync/syncImmediateQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const Bull = require('bull')
const {
logger,
logInfoWithDuration,
logErrorWithDuration
logErrorWithDuration,
getStartTime
} = require('../../logging')
const secondarySyncFromPrimary = require('./secondarySyncFromPrimary')

Expand Down Expand Up @@ -50,7 +51,7 @@ class SyncImmediateQueue {
const { wallet, creatorNodeEndpoint, forceResyncConfig, logContext } =
job.data

const startTime = Date.now()
const startTime = getStartTime()
try {
await secondarySyncFromPrimary({
serviceRegistry: this.serviceRegistry,
Expand Down
5 changes: 3 additions & 2 deletions creator-node/src/services/sync/syncQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const Bull = require('bull')
const {
logger,
logInfoWithDuration,
logErrorWithDuration
logErrorWithDuration,
getStartTime
} = require('../../logging')
const secondarySyncFromPrimary = require('./secondarySyncFromPrimary')

Expand Down Expand Up @@ -63,7 +64,7 @@ class SyncQueue {
} = job.data

let result = {}
const startTime = Date.now()
const startTime = getStartTime()
try {
result = await secondarySyncFromPrimary({
serviceRegistry: this.serviceRegistry,
Expand Down

0 comments on commit 0b4d837

Please sign in to comment.