Skip to content

Commit

Permalink
fix neo4j warning
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Sep 12, 2024
1 parent 4a06dc9 commit b9b57d0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bbot/modules/output/neo4j.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b9b57d0

Please sign in to comment.