Skip to content

Commit 3656742

Browse files
committed
Add a production guard before direct GA recomputation.
1 parent 47ed2a1 commit 3656742

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

application/cmd/cre_main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,10 @@ def backfill_gap_analysis_only(
730730
if os.environ.get("CRE_NO_NEO4J") != "1":
731731
populate_neo4j_db(db_connection_str)
732732

733-
gap_analysis.backfill_opencre_direct_pairs(collection, refresh=True)
733+
if os.environ.get("OPENCRE_ENV") not in {"heroku", "opencreorg"}:
734+
gap_analysis.backfill_opencre_direct_pairs(collection, refresh=True)
735+
else:
736+
logger.warning("Skipping GA recomputation on production environment")
734737

735738
missing = _missing_ga_pairs(collection)
736739
if max_pairs > 0:

0 commit comments

Comments
 (0)