mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-22 19:51:02 +02:00
Tweaked metadata to reduce unnecessary
This commit is contained in:
parent
8655152ab4
commit
e1ced377eb
1 changed files with 18 additions and 6 deletions
|
|
@ -97,16 +97,28 @@ class Processor(FlowProcessor):
|
||||||
return TRUSTGRAPH_ENTITIES + urllib.parse.quote(text)
|
return TRUSTGRAPH_ENTITIES + urllib.parse.quote(text)
|
||||||
|
|
||||||
async def emit_triples(self, pub, metadata, triples):
|
async def emit_triples(self, pub, metadata, triples):
|
||||||
tpls = Triples()
|
tpls = Triples(
|
||||||
tpls.metadata = metadata
|
metadata = Metadata(
|
||||||
tpls.triples = triples
|
id = metadata.id,
|
||||||
|
metadata = [],
|
||||||
|
user = metadata.user,
|
||||||
|
collection = metadata.collection,
|
||||||
|
),
|
||||||
|
triples = triples,
|
||||||
|
)
|
||||||
|
|
||||||
await pub.send(tpls)
|
await pub.send(tpls)
|
||||||
|
|
||||||
async def emit_entity_contexts(self, pub, metadata, entity_contexts):
|
async def emit_entity_contexts(self, pub, metadata, entity_contexts):
|
||||||
ecs = EntityContexts()
|
ecs = EntityContexts(
|
||||||
ecs.metadata = metadata
|
metadata = Metadata(
|
||||||
ecs.entities = entity_contexts
|
id = metadata.id,
|
||||||
|
metadata = [],
|
||||||
|
user = metadata.user,
|
||||||
|
collection = metadata.collection,
|
||||||
|
),
|
||||||
|
entities = entity_contexts,
|
||||||
|
)
|
||||||
|
|
||||||
await pub.send(ecs)
|
await pub.send(ecs)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue