From 39e243c0786bcaf516462a595773e0325e9788cc Mon Sep 17 00:00:00 2001 From: David Dworken Date: Sun, 15 Sep 2024 18:29:05 -0700 Subject: [PATCH] Disable usage data stat tracking for self-hosted servers for #246 --- backend/server/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/server/server.go b/backend/server/server.go index 39d28b6..e55d17f 100644 --- a/backend/server/server.go +++ b/backend/server/server.go @@ -225,7 +225,7 @@ func main() { server.IsProductionEnvironment(isProductionEnvironment()), server.WithCron(cron), server.WithUpdateInfo(release.BuildUpdateInfo(release.Version)), - server.TrackUsageData(true), + server.TrackUsageData(isProductionEnvironment() || isTestEnvironment() || os.Getenv("HISHTORY_ENABLE_USAGE_STATS") != ""), ) go runBackgroundJobs(context.Background(), srv, db, stats)