switch time to 24 hour checkins

This commit is contained in:
afeiszli
2022-01-21 14:16:28 -05:00
parent 2f12ded906
commit 351a2ac5a8
2 changed files with 3 additions and 3 deletions

View File

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

View File

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