refactor: remove enviformer loading in settings

This commit is contained in:
2025-11-05 17:33:41 +13:00
parent 06a6c23d05
commit 211ebfd19b

View File

@ -241,13 +241,7 @@ LOGGING = {
# Flags # Flags
ENVIFORMER_PRESENT = os.environ.get("ENVIFORMER_PRESENT", "False") == "True" ENVIFORMER_PRESENT = os.environ.get("ENVIFORMER_PRESENT", "False") == "True"
if ENVIFORMER_PRESENT: ENVIFORMER_DEVICE = os.environ.get("ENVIFORMER_DEVICE", "cpu")
print("Loading enviFormer")
device = os.environ.get("ENVIFORMER_DEVICE", "cpu")
from enviformer import load
ENVIFORMER_INSTANCE = load(device=device)
print("loaded")
# If celery is not present set always eager to true which will cause delayed tasks to block until finished # If celery is not present set always eager to true which will cause delayed tasks to block until finished