mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-20 18:51:03 +02:00
Fix some issues including uploading large docs
This commit is contained in:
parent
04e0b6953f
commit
f68a4f21b1
5 changed files with 10 additions and 4 deletions
|
|
@ -37,6 +37,7 @@ class Publisher:
|
|||
while self.running:
|
||||
|
||||
try:
|
||||
|
||||
producer = self.client.create_producer(
|
||||
topic=self.topic,
|
||||
schema=JsonSchema(self.schema),
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ def show_docs(url, user):
|
|||
table,
|
||||
tablefmt="pretty",
|
||||
stralign="left",
|
||||
maxcolwidths=[None, 55],
|
||||
))
|
||||
print()
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ def show_procs(url, user):
|
|||
table,
|
||||
tablefmt="pretty",
|
||||
stralign="left",
|
||||
maxcolwidths=[None, 50],
|
||||
))
|
||||
print()
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue