mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 13:18:18 +00:00
Improve logic to disable telemetry via KHOJ_TELEMETRY_DISABLE env var
The newly added KHOJ_TELEMETRY_DISABLE env var knob to disable telemetry should override old config mechanism when set
This commit is contained in:
@@ -256,9 +256,9 @@ def get_server_id():
|
||||
|
||||
|
||||
def telemetry_disabled(app_config: AppConfig, telemetry_disable_env) -> bool:
|
||||
return (
|
||||
not app_config.should_log_telemetry if app_config and app_config.should_log_telemetry else telemetry_disable_env
|
||||
)
|
||||
if telemetry_disable_env is True:
|
||||
return True
|
||||
return not app_config or not app_config.should_log_telemetry
|
||||
|
||||
|
||||
def log_telemetry(
|
||||
|
||||
Reference in New Issue
Block a user