diff --git a/bbot/modules/output/neo4j.py b/bbot/modules/output/neo4j.py index bb7c9e5c4a..f9219ab364 100644 --- a/bbot/modules/output/neo4j.py +++ b/bbot/modules/output/neo4j.py @@ -1,10 +1,15 @@ import json +import logging from contextlib import suppress from neo4j import AsyncGraphDatabase from bbot.modules.output.base import BaseOutputModule +# silence annoying neo4j logger +logging.getLogger("neo4j").setLevel(logging.CRITICAL) + + class neo4j(BaseOutputModule): """ # start Neo4j in the background with docker @@ -110,7 +115,7 @@ async def merge_events(self, events, event_type, id_only=False): cypher = f"""UNWIND $events AS event MERGE (_:{event_type} {{ id: event.id }}) - SET _ += event + SET _ += properties(event) RETURN event.data as event_data, event.id as event_id, elementId(_) as neo4j_id""" neo4j_ids = {} # insert events