feat: review uncertain weekly brief deliveries with audit history
This commit is contained in:
@@ -31,6 +31,7 @@ export function createBriefSender({ store, buildBrief, text, html, telegramConfi
|
||||
});
|
||||
if (!channels.length) { r.kanalsiz++; continue; }
|
||||
const batch = outbox?.prepare(briefWeekKey(clock()),user.email,channels.map(channel=>channel.payload));
|
||||
if (batch?.closed) { r.atlanan+=batch.count; continue; }
|
||||
if (batch?.changed) { r.bekleyen++; r.hata++; continue; }
|
||||
const failedChannels = new Set();
|
||||
for (const [position,channel] of channels.entries()) {
|
||||
@@ -38,7 +39,7 @@ export function createBriefSender({ store, buildBrief, text, html, telegramConfi
|
||||
// An earlier channel can await the network while the user disables briefs.
|
||||
if (store.getData(user.email, 'brief')?.kapali) { r.kapali++; break; }
|
||||
const claim = outbox?.claim(batch.id,position,clock().getTime());
|
||||
if (claim?.state === 'accepted') { r.atlanan++; continue; }
|
||||
if (claim?.state === 'accepted' || claim?.state === 'skipped') { r.atlanan++; continue; }
|
||||
if (claim && claim.state !== 'sending') {
|
||||
r.bekleyen++; failedChannels.add(channel.name);
|
||||
if (claim.state === 'uncertain') failed=true;
|
||||
|
||||
Reference in New Issue
Block a user