Skip to content
This repository was archived by the owner on Mar 20, 2026. It is now read-only.

Commit 84fda8b

Browse files
committed
fix(shim): add missing fields for pdf-pdfmetadata station validation
1 parent ba618b6 commit 84fda8b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • workers/document-source-shim

workers/document-source-shim/app.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ def handle(ch, method, properties, body):
113113

114114
# Build the record that the pdf-pdfmetadata station expects
115115
# This mimics what document-source station would produce
116+
now = datetime.now(timezone.utc).isoformat()
116117
station_input = {
117118
"id": record_id,
118119
"bucketName": bucket_name,
@@ -122,11 +123,15 @@ def handle(ch, method, properties, body):
122123
"documentId": filename,
123124
"itemIndex": None,
124125
"traceId": trace_id,
125-
"processingStartDate": datetime.now(timezone.utc).isoformat(),
126+
"processingStartDate": now,
126127
"state": "processing",
127128
"attributes": attrs,
128129
"knownAttributeNames": list(attrs.keys()),
129130
"knownAttributeStats": {},
131+
# Required fields for pdf-pdfmetadata station
132+
"kimiRegistrationDate": now,
133+
"creationDate": now,
134+
"processCount": 0,
130135
}
131136

132137
out_body = json.dumps(station_input).encode("utf-8")

0 commit comments

Comments
 (0)