Skip to content

Commit

Permalink
unable to go lower than 1h
Browse files Browse the repository at this point in the history
  • Loading branch information
waisbrot committed Jan 1, 2024
1 parent f8a9864 commit 5bfc978
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions birdweather/forStation.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ func BirdsForStation(stationid string) (string, []structs.BirdCount) {
return counts.Station.Name, result
}

func RecordCountsForStationPastMinutes(stationId string, minutes int) {
func RecordCountsForStationPastMinutes(stationId string, hours int) {
client := graphql.NewClient("https://app.birdweather.com/graphql", http.DefaultClient)
duration := InputDuration{
Count: minutes,
Unit: "minute",
Count: hours,
Unit: "hour",
}
counts, err := hourlyCounts(context.Background(), client, stationId, duration)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/hourlyMetrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var hourlyMetricsCmd = &cobra.Command{
stationIds := viper.GetIntSlice("stations")
for _, stationId := range stationIds {
fmt.Printf("Recording counts for station %d\n", stationId)
birdweather.RecordCountsForStationPastMinutes(fmt.Sprint(stationId), 30)
birdweather.RecordCountsForStationPastMinutes(fmt.Sprint(stationId), 1)
}
},
}
Expand Down

0 comments on commit 5bfc978

Please sign in to comment.