mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-28 03:01:48 +08:00
switch time to 24 hour checkins
This commit is contained in:
@@ -194,7 +194,7 @@ func FetchRecords(tableName string) (map[string]string, error) {
|
||||
return getCurrentDB()[FETCH_ALL].(func(string) (map[string]string, error))(tableName)
|
||||
}
|
||||
|
||||
// FetchRecords - fetches all records in given table
|
||||
// InitializeUUID - create a UUID record for server if none exists
|
||||
func InitializeUUID() error {
|
||||
records, err := FetchRecords(SERVER_UUID_TABLE_NAME)
|
||||
if err != nil {
|
||||
|
||||
@@ -28,9 +28,9 @@ func TelemetryCheckpoint() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// sendtime := time.Unix(telRecord.LastSend, 0).Add(time.Hour * time.Duration(TELEMETRY_HOURS_BETWEEN_SEND))
|
||||
sendtime := time.Unix(telRecord.LastSend, 0).Add(time.Hour * time.Duration(TELEMETRY_HOURS_BETWEEN_SEND))
|
||||
// can set to 2 minutes for testing
|
||||
sendtime := time.Unix(telRecord.LastSend, 0).Add(time.Minute * 2)
|
||||
//sendtime := time.Unix(telRecord.LastSend, 0).Add(time.Minute * 2)
|
||||
enoughTimeElapsed := time.Now().After(sendtime)
|
||||
|
||||
// if more than 24 hours has elapsed, send telemetry to posthog
|
||||
|
||||
Reference in New Issue
Block a user