From 400d65b58f5b1e918c6180454c02fdf20f573c1b Mon Sep 17 00:00:00 2001 From: dtookey Date: Fri, 29 Apr 2022 15:09:45 -0400 Subject: [PATCH] changed the insight scraper to get all data for every person, and then create the engineering_contributions table by filtering against clarity user info --- src/insight/insight-connect.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/insight/insight-connect.go b/src/insight/insight-connect.go index 66dda2c..cc90bed 100644 --- a/src/insight/insight-connect.go +++ b/src/insight/insight-connect.go @@ -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)