diff --git a/trustgraph-cli/scripts/tg-load-kg-core b/trustgraph-cli/scripts/tg-load-kg-core index 13fac153..e2d0a405 100755 --- a/trustgraph-cli/scripts/tg-load-kg-core +++ b/trustgraph-cli/scripts/tg-load-kg-core @@ -104,8 +104,10 @@ async def loader(ge_queue, t_queue, path, format, user, collection): async def run(**args): - ge_q = asyncio.Queue() - t_q = asyncio.Queue() + # Maxsize on queues reduces back-pressure so tg-load-kg-core doesn't + # grow to eat all memory + ge_q = asyncio.Queue(maxsize=500) + t_q = asyncio.Queue(maxsize=500) load_task = asyncio.create_task( loader( diff --git a/trustgraph-flow/trustgraph/api/gateway/service.py b/trustgraph-flow/trustgraph/api/gateway/service.py index 0ae01d3a..7b12e1a2 100755 --- a/trustgraph-flow/trustgraph/api/gateway/service.py +++ b/trustgraph-flow/trustgraph/api/gateway/service.py @@ -231,7 +231,7 @@ def serialize_graph_embeddings(message): "collection": message.metadata.collection, }, "vectors": message.vectors, - "entity": message.entity.value, + "entity": message.entity, } class Api: