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