mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-02-20 06:55:08 +00:00
Improve logic to disable telemetry via KHOJ_TELEMETRY_DISABLE env var
Some checks failed
dockerize / Publish Khoj Docker Images (push) Waiting to run
build and deploy github pages for documentation / deploy (push) Waiting to run
pre-commit / Setup Application and Lint (push) Waiting to run
pypi / Publish Python Package to PyPI (push) Waiting to run
test / Run Tests (push) Waiting to run
build khoj.el / build (push) Has been cancelled
desktop / 🖥️ Build, Release Desktop App (push) Has been cancelled
test khoj.el / test (27.1) (push) Has been cancelled
test khoj.el / test (27.2) (push) Has been cancelled
test khoj.el / test (28.1) (push) Has been cancelled
test khoj.el / test (28.2) (push) Has been cancelled
test khoj.el / test (snapshot) (push) Has been cancelled
Some checks failed
dockerize / Publish Khoj Docker Images (push) Waiting to run
build and deploy github pages for documentation / deploy (push) Waiting to run
pre-commit / Setup Application and Lint (push) Waiting to run
pypi / Publish Python Package to PyPI (push) Waiting to run
test / Run Tests (push) Waiting to run
build khoj.el / build (push) Has been cancelled
desktop / 🖥️ Build, Release Desktop App (push) Has been cancelled
test khoj.el / test (27.1) (push) Has been cancelled
test khoj.el / test (27.2) (push) Has been cancelled
test khoj.el / test (28.1) (push) Has been cancelled
test khoj.el / test (28.2) (push) Has been cancelled
test khoj.el / test (snapshot) (push) Has been cancelled
The newly added KHOJ_TELEMETRY_DISABLE env var knob to disable telemetry should override old config mechanism when set
This commit is contained in:
parent
2d683898c2
commit
7c77d65d35
1 changed files with 3 additions and 3 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Reference in a new issue