changed the insight scraper to get all data for every person, and then create the engineering_contributions table by filtering against clarity user info

master
dtookey 4 years ago
parent 7be29424a9
commit 400d65b58f

@ -8,6 +8,7 @@ import (
"net/http"
"os"
"strings"
"time"
)
const (
@ -118,12 +119,13 @@ func (ic *Interconnect) UpdateUsers() {
}
func (ic *Interconnect) UpdateTimeEntries() {
users := ic.DBConnector.FetchEngineerUsers()
users := ic.DBConnector.FetchUsers()
entryChan := make(chan *[]*TimeEntry)
coroutineCount := 0
for _, userPtr := range *users {
go ic.Client.GetTimeAllTimeEntriesForUserThroughDate(userPtr.Id, "2022-04-28", entryChan)
coroutineCount++
time.Sleep(200 * time.Millisecond)
}
log.Printf("Currently working goroutines: %d\n", coroutineCount)

Loading…
Cancel
Save