Skip to content

Commit

Permalink
Comments and var names changed on mongofw/wr replication.
Browse files Browse the repository at this point in the history
  • Loading branch information
riclolsen committed May 27, 2024
1 parent 89fc848 commit bef7cf9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/mongofw/app-defs.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ module.exports = {
IP_DESTINATION: '255.255.255.255', // IP address for the destination of packets
UDP_PORT: 12345, // UDP port to send packets
PACKETS_INTERVAL: 1, // ms of minimal interval between packets
MAX_LENGTH_JSON: 60000, // max size of serialized JSON that can be forwarded
PACKET_SIZE_THRESHOLD: 7000, // limit of serialized JSON to break array of objects to the next packet
MAX_LENGTH_JSON: 60000, // max size of serialized JSON (before compression) that can be forwarded on a UDP message
PACKET_SIZE_THRESHOLD: 7000, // limit of serialized JSON to break array of objects to the next UDP message
INTERVAL_AFTER_EMPTY_QUEUE: 250, // ms of interval respected after queue of changes emptied
MAX_SEQUENCE_OF_PACKETS: 50, // max number of packets in fast sequence
INTERVAL_AFTER_PACKETS_SEQ: 100, // min interval after MAX_SEQUENCE_OF_PACKETS exceeded
MAX_SEQUENCE_OF_UDPMSGS: 50, // max number of packets in fast sequence
INTERVAL_AFTER_UDPMSGS_SEQ: 100, // min interval after MAX_SEQUENCE_OF_UDPMSGS exceeded
PACKET_SIZE_BREAK_SEQ: 6000, // packets large than this limit will break a fast sequence
INTERVAL_INTEGRITY: 3600, // interval in minutes for point database integrity
}
4 changes: 2 additions & 2 deletions src/mongofw/customized_module.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,12 @@ async function procQueue() {
Log.log(' Chg count ' + cntChg)
Log.log(' Pkt count ' + pktCnt)
if (
cntSeq > AppDefs.MAX_SEQUENCE_OF_PACKETS ||
cntSeq > AppDefs.MAX_SEQUENCE_OF_UDPMSGS ||
buff.length > AppDefs.PACKET_SIZE_BREAK_SEQ
) {
setTimeout(
procQueue,
AppDefs.INTERVAL_AFTER_PACKETS_SEQ + 100 * parseInt(buff.length / 1500)
AppDefs.INTERVAL_AFTER_UDPMSGS_SEQ + 100 * parseInt(buff.length / 1500)
)
return
}
Expand Down

0 comments on commit bef7cf9

Please sign in to comment.