Fix FinTS transaction deduplication
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user