()
| 24 | |
| 25 | |
| 26 | def is_workflows_enabled() -> bool: |
| 27 | if _env_truthy(_DISABLE_ENV): |
| 28 | return False |
| 29 | try: |
| 30 | from src.settings.settings import get_settings |
| 31 | |
| 32 | settings = get_settings() |
| 33 | except Exception: |
| 34 | # Pre-startup / no settings available: default to enabled (the env |
| 35 | # kill-switch above still applies). |
| 36 | return True |
| 37 | if getattr(settings, "disable_workflows", False): |
| 38 | return False |
| 39 | extra = getattr(settings, "extra", None) |
| 40 | if isinstance(extra, dict) and extra.get("disableWorkflows"): |
| 41 | return False |
| 42 | return True |
no test coverage detected