From 2fb50cce71b832b6d331fa3d837ac491c08917d3 Mon Sep 17 00:00:00 2001 From: Aaron Nelson Date: Thu, 30 Apr 2026 16:20:11 +0000 Subject: [PATCH] ingest.py: guard Stage 2 enqueue behind SKIP_STAGE2_ENQUEUE env var for migration runs --- scripts/ingest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/ingest.py b/scripts/ingest.py index 2d5a726..487ba90 100644 --- a/scripts/ingest.py +++ b/scripts/ingest.py @@ -143,7 +143,9 @@ def ingest_file(filepath): print(f" Indexed {len(chunks)} chunks: {path.name}") # Enqueue for Stage 2 → Stage 3 (Graphiti pipeline) - enqueue_stage2(path.name, text) + # SKIP_STAGE2_ENQUEUE env var set by migration scripts to prevent bulk enqueue + if not os.getenv("SKIP_STAGE2_ENQUEUE"): + enqueue_stage2(path.name, text) return len(chunks)