adding telemetry

This commit is contained in:
afeiszli 2022-01-20 17:52:49 -05:00
parent 4d2a85f879
commit 2f12ded906
2 changed files with 2 additions and 2 deletions

View file

@ -164,7 +164,7 @@ type ServerUpdateData struct {
Node Node `json:"servernode" bson:"servernode"`
}
// ServerUUID - contains UUID of the server
// Telemetry - contains UUID of the server and timestamp of last send to posthog
type Telemetry struct {
UUID string `json:"uuid" bson:"uuid"`
LastSend int64 `json:"lastsend" bson:"lastsend"`

View file

@ -320,7 +320,7 @@ func IsClientMode() string {
return isclient
}
// IsClientMode - checks if it should run in client mode
// Telemetry - checks if telemetry data should be sent
func Telemetry() string {
telemetry := "on"
if os.Getenv("TELEMETRY") == "off" {