Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit 83243f9

Browse files
committed
only run this on DEV
1 parent 7d6fb3d commit 83243f9

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

core/apps.py

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,23 @@ class CoreConfig(AppConfig):
1717
def ready(self):
1818
import core.signals # noqa: F401
1919

20-
try:
21-
# Call your management command here
22-
call_command(
23-
"insert_data_to_db_from_csv",
24-
"core/management/commands/codecovTiers-Jan25.csv",
25-
"--model",
26-
"tiers",
27-
)
28-
call_command(
29-
"insert_data_to_db_from_csv",
30-
"core/management/commands/codecovPlans-Jan25.csv",
31-
"--model",
32-
"plans",
33-
)
34-
except Exception as e:
35-
logger.error(f"Failed to run startup command: {e}")
20+
if RUN_ENV == "DEV":
21+
try:
22+
# Call your management command here
23+
call_command(
24+
"insert_data_to_db_from_csv",
25+
"core/management/commands/codecovTiers-Jan25.csv",
26+
"--model",
27+
"tiers",
28+
)
29+
call_command(
30+
"insert_data_to_db_from_csv",
31+
"core/management/commands/codecovPlans-Jan25.csv",
32+
"--model",
33+
"plans",
34+
)
35+
except Exception as e:
36+
logger.error(f"Failed to run startup command: {e}")
3637

3738
if RUN_ENV not in ["DEV", "TESTING"]:
3839
cache_backend = RedisBackend(get_redis_connection())

0 commit comments

Comments
 (0)