Fix some issues including uploading large docs

This commit is contained in:
Cyber MacGeddon 2025-05-05 18:33:32 +01:00
parent 04e0b6953f
commit f68a4f21b1
5 changed files with 10 additions and 4 deletions

View file

@ -37,6 +37,7 @@ class Publisher:
while self.running:
try:
producer = self.client.create_producer(
topic=self.topic,
schema=JsonSchema(self.schema),

View file

@ -125,10 +125,13 @@ class LibrarianResponse(Record):
document_metadatas = Array(DocumentMetadata())
processing_metadatas = Array(ProcessingMetadata())
# FIXME: Is this right? Using persistence on librarian so that
# message chunking works
librarian_request_queue = topic(
'librarian', kind='non-persistent', namespace='request'
'librarian', kind='persistent', namespace='request'
)
librarian_response_queue = topic(
'librarian', kind='non-persistent', namespace='response',
'librarian', kind='persistent', namespace='response',
)

View file

@ -36,6 +36,7 @@ def show_docs(url, user):
table,
tablefmt="pretty",
stralign="left",
maxcolwidths=[None, 55],
))
print()

View file

@ -36,6 +36,7 @@ def show_procs(url, user):
table,
tablefmt="pretty",
stralign="left",
maxcolwidths=[None, 50],
))
print()

View file

@ -105,7 +105,7 @@ def serialize_document_metadata(message):
if message.user:
ret["user"] = message.user
if message.tags:
if message.tags is not None:
ret["tags"] = message.tags
return ret
@ -132,7 +132,7 @@ def serialize_processing_metadata(message):
if message.collection:
ret["collection"] = message.collection
if message.tags:
if message.tags is not None:
ret["tags"] = message.tags
return ret