Skip to content

Commit

Permalink
Changed timing of messages on mongofw/wr replication.
Browse files Browse the repository at this point in the history
  • Loading branch information
riclolsen committed May 25, 2024
1 parent ff27b43 commit ff4ed93
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/mongowr/customized_module.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,7 @@ async function procQueue() {
//Log.log('Max: ' + maxSz)
//Log.log('CntPrMx: ' + cntPrMx)
Log.log('Queue Size: ' + msgQueue.size())
if (msgQueue.size() > 5000) {
msgQueue.clear()
Log.log('Queue too large! Emptied!')
}
// const dataObj = JSON.parse(msg)

if (!dataObj?.cnt) {
Log.log('Unexpected format')
}
Expand Down Expand Up @@ -146,5 +142,10 @@ async function procQueue() {
}
}

if (msgQueue.size() > 5000) {
msgQueue.clear()
Log.log('Queue too large! Emptied!')
}

setTimeout(procQueue, 100)
}

0 comments on commit ff4ed93

Please sign in to comment.