Fix FinTS transaction deduplication

This commit is contained in:
Matthias
2026-06-23 12:37:41 +02:00
parent 993616c2f9
commit 6e687dc9b5
8 changed files with 451 additions and 2 deletions

View File

@@ -132,6 +132,8 @@ async function commitRowsHandler(
let importedCount = 0;
let skippedCount = 0;
let skippedByExternalRef = 0;
let skippedByDedupHash = 0;
for (const row of args.rows) {
if (row.externalRef) {
@@ -143,6 +145,7 @@ async function commitRowsHandler(
.unique();
if (existingRef) {
skippedCount++;
skippedByExternalRef++;
continue;
}
}
@@ -162,6 +165,7 @@ async function commitRowsHandler(
.unique();
if (existingDedup) {
skippedCount++;
skippedByDedupHash++;
continue;
}
@@ -204,5 +208,14 @@ async function commitRowsHandler(
status: "completed",
});
console.info("[imports] Commit-Ergebnis", {
source: args.source,
rowCount: args.rows.length,
importedCount,
skippedCount,
skippedByExternalRef,
skippedByDedupHash,
});
return { importId, importedCount, skippedCount };
}