mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-06-07 13:55:14 +02:00
- Reduce back-pressure on tg-load-kg-core (#179)
- Save entity in correct format in tg-save-core
This commit is contained in:
parent
99e3e43f7b
commit
2f7ccb2ef8
2 changed files with 5 additions and 3 deletions
|
|
@ -104,8 +104,10 @@ async def loader(ge_queue, t_queue, path, format, user, collection):
|
||||||
|
|
||||||
async def run(**args):
|
async def run(**args):
|
||||||
|
|
||||||
ge_q = asyncio.Queue()
|
# Maxsize on queues reduces back-pressure so tg-load-kg-core doesn't
|
||||||
t_q = asyncio.Queue()
|
# grow to eat all memory
|
||||||
|
ge_q = asyncio.Queue(maxsize=500)
|
||||||
|
t_q = asyncio.Queue(maxsize=500)
|
||||||
|
|
||||||
load_task = asyncio.create_task(
|
load_task = asyncio.create_task(
|
||||||
loader(
|
loader(
|
||||||
|
|
|
||||||
|
|
@ -231,7 +231,7 @@ def serialize_graph_embeddings(message):
|
||||||
"collection": message.metadata.collection,
|
"collection": message.metadata.collection,
|
||||||
},
|
},
|
||||||
"vectors": message.vectors,
|
"vectors": message.vectors,
|
||||||
"entity": message.entity.value,
|
"entity": message.entity,
|
||||||
}
|
}
|
||||||
|
|
||||||
class Api:
|
class Api:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue