From b9b57d0ab779efa695d1579fc802cbcd06051d80 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 11 Sep 2024 21:37:33 -0400 Subject: [PATCH] fix neo4j warning --- bbot/modules/output/neo4j.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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