removed a hard coded date string in the UpdateTimeEntries method on the Interconnect struct

master
dtookey 4 years ago
parent 9246c1a5bb
commit 019c9f16d7

@ -122,8 +122,9 @@ func (ic *Interconnect) UpdateTimeEntries() {
users := ic.DBConnector.FetchUsers()
entryChan := make(chan *[]*TimeEntry)
coroutineCount := 0
dateString := createDateString()
for _, userPtr := range *users {
go ic.Client.GetTimeAllTimeEntriesForUserThroughDate(userPtr.Id, "2022-04-28", entryChan)
go ic.Client.GetTimeAllTimeEntriesForUserThroughDate(userPtr.Id, dateString, entryChan)
coroutineCount++
time.Sleep(1000 * time.Millisecond)
}
@ -257,4 +258,9 @@ func cacheTokens() *map[string]string {
return &ret
}
func createDateString() string {
now := time.Now()
return now.Format("2006-01-02")
}
//</editor-fold>

Loading…
Cancel
Save