timestamp

This commit is contained in:
2026-07-12 14:05:05 -05:00
parent 6c3eadc2c3
commit d95b8c112d

View File

@@ -358,6 +358,7 @@ function mergeRecord(det: BuyerRecord, vis: VisionRaw, model: string): BuyerReco
...det,
_parser: "vision",
_vision_model: model,
_vision_ts: new Date().toISOString(),
_vision_error: undefined,
};
delete (base as Record<string, unknown>)["_vision_error"];
@@ -451,7 +452,7 @@ async function main(): Promise<void> {
const pdfPath = pdfIndex.get(det.file_name);
if (!pdfPath) {
done.set(det.file_name, { ...det, _vision_error: "PDF nicht gefunden" });
done.set(det.file_name, { ...det, _vision_error: "PDF nicht gefunden", _vision_ts: new Date().toISOString() });
errors++;
progress(`${tag} … FEHLER: PDF nicht gefunden`);
continue;
@@ -476,7 +477,7 @@ async function main(): Promise<void> {
}
if (!vis) {
done.set(det.file_name, { ...det, _vision_error: lastErr });
done.set(det.file_name, { ...det, _vision_error: lastErr, _vision_ts: new Date().toISOString() });
errors++;
progress(`${tag} … FEHLER: ${lastErr}`);
} else {
@@ -487,7 +488,7 @@ async function main(): Promise<void> {
}
} catch (e) {
const msg = e instanceof Error ? e.message : String(e);
done.set(det.file_name, { ...det, _vision_error: msg });
done.set(det.file_name, { ...det, _vision_error: msg, _vision_ts: new Date().toISOString() });
errors++;
progress(`${tag} … FEHLER: ${msg}`);
} finally {