mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-21 11:11: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:
|
while self.running:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
producer = self.client.create_producer(
|
producer = self.client.create_producer(
|
||||||
topic=self.topic,
|
topic=self.topic,
|
||||||
schema=JsonSchema(self.schema),
|
schema=JsonSchema(self.schema),
|
||||||
|
|
|
||||||
|
|
@ -125,10 +125,13 @@ class LibrarianResponse(Record):
|
||||||
document_metadatas = Array(DocumentMetadata())
|
document_metadatas = Array(DocumentMetadata())
|
||||||
processing_metadatas = Array(ProcessingMetadata())
|
processing_metadatas = Array(ProcessingMetadata())
|
||||||
|
|
||||||
|
# FIXME: Is this right? Using persistence on librarian so that
|
||||||
|
# message chunking works
|
||||||
|
|
||||||
librarian_request_queue = topic(
|
librarian_request_queue = topic(
|
||||||
'librarian', kind='non-persistent', namespace='request'
|
'librarian', kind='persistent', namespace='request'
|
||||||
)
|
)
|
||||||
librarian_response_queue = topic(
|
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,
|
table,
|
||||||
tablefmt="pretty",
|
tablefmt="pretty",
|
||||||
stralign="left",
|
stralign="left",
|
||||||
|
maxcolwidths=[None, 55],
|
||||||
))
|
))
|
||||||
print()
|
print()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ def show_procs(url, user):
|
||||||
table,
|
table,
|
||||||
tablefmt="pretty",
|
tablefmt="pretty",
|
||||||
stralign="left",
|
stralign="left",
|
||||||
|
maxcolwidths=[None, 50],
|
||||||
))
|
))
|
||||||
print()
|
print()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ def serialize_document_metadata(message):
|
||||||
if message.user:
|
if message.user:
|
||||||
ret["user"] = message.user
|
ret["user"] = message.user
|
||||||
|
|
||||||
if message.tags:
|
if message.tags is not None:
|
||||||
ret["tags"] = message.tags
|
ret["tags"] = message.tags
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
@ -132,7 +132,7 @@ def serialize_processing_metadata(message):
|
||||||
if message.collection:
|
if message.collection:
|
||||||
ret["collection"] = message.collection
|
ret["collection"] = message.collection
|
||||||
|
|
||||||
if message.tags:
|
if message.tags is not None:
|
||||||
ret["tags"] = message.tags
|
ret["tags"] = message.tags
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue