MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _env_flag

Function _env_flag

deployments/feishu/webhook-server/scripts/scheduler.py:39–41  ·  view source on GitHub ↗
(name: str, default: bool = True)

Source from the content-addressed store, hash-verified

37
38def _env_flag(name: str, default: bool = True) -> bool:
39 raw = os.environ.get(name, "true" if default else "false").strip().lower()
40 return raw not in {"0", "false", "no", "off", "disabled"}
41
42
43def scheduler_enabled() -> bool:
44 return _env_flag("PAPERFLOW_SCHEDULER_ENABLED", True)

Callers 1

scheduler_enabledFunction · 0.70

Calls 1

getMethod · 0.80

Tested by

no test coverage detected