fix(attack-paths): Start Neo4j at startup for API only (#9872)

Co-authored-by: Pepe Fagoaga <pepe@prowler.com>
This commit is contained in:
Josema Camacho
2026-01-23 10:52:22 +01:00
committed by GitHub
parent be2a58dc82
commit cb367da97d
4 changed files with 119 additions and 5 deletions
@@ -1,8 +1,9 @@
"""
Tests for Neo4j database lazy initialization.
The Neo4j driver should only connect when actually needed (lazy initialization),
not at Django app startup. This allows regular scans to run without Neo4j.
The Neo4j driver connects on first use by default. API processes may
eagerly initialize the driver during app startup, while Celery workers
remain lazy. These tests validate the database module behavior itself.
"""
import threading