Disable usage data stat tracking for self-hosted servers for #246 (#250)

* Add TODO

* Disable usage data stat tracking for self-hosted servers for #246
This commit is contained in:
David Dworken 2024-09-15 18:58:48 -07:00 committed by GitHub
parent 11fc92ee5f
commit fa4dc938fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -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)

View File

@ -927,3 +927,4 @@ func TuiQuery(ctx context.Context, shellName, initialQuery string) error {
// TODO: support custom key bindings
// TODO: make the help page wrap
// TODO: If the initial query contains dashes, maybe we should smartly escape them?