feat(ack): operational loglines voor ack-loop zichtbaarheid
This commit is contained in:
parent
7b4e307438
commit
be3dde4908
1 changed files with 5 additions and 1 deletions
|
|
@ -24,6 +24,7 @@ function registerSend(messageId, chatId, filename) {
|
|||
ack: 0,
|
||||
notifiedStuck: false
|
||||
})
|
||||
console.log(`[ack] track ${messageId} (${filename} → ${chatId})`)
|
||||
}
|
||||
|
||||
function handleAck(messageId, ack) {
|
||||
|
|
@ -31,7 +32,10 @@ function handleAck(messageId, ack) {
|
|||
const entry = sends.get(messageId)
|
||||
if (!entry) return
|
||||
if (ack > entry.ack) entry.ack = ack
|
||||
if (ack >= 2) sends.delete(messageId) // delivered; nothing left to track
|
||||
if (ack >= 2) {
|
||||
sends.delete(messageId) // delivered; nothing left to track
|
||||
console.log(`[ack] delivered ack=${ack} ${messageId} (${entry.filename})`)
|
||||
}
|
||||
}
|
||||
|
||||
function stuckEntries() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue