Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
alanhamlett committed Jul 23, 2024
1 parent af87dc7 commit 1e98bdb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions cmd/heartbeat/heartbeat.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ func SendHeartbeats(v *viper.Viper, queueFilepath string) error {
}
}

ResetRateLimit(v)
err = ResetRateLimit(v)
if err != nil {
log.Errorln(err)
}

return nil
}
Expand Down Expand Up @@ -200,7 +203,7 @@ func RateLimited(offline paramscmd.Offline) bool {
return time.Since(offline.LastSentAt) < offline.RateLimit
}

// ResetRateLimit updates the internal.heartbeats_last_sent_at timestamp
// ResetRateLimit updates the internal.heartbeats_last_sent_at timestamp.
func ResetRateLimit(v *viper.Viper) error {
w, err := ini.NewWriter(v, ini.InternalFilePath)
if err != nil {
Expand Down
5 changes: 4 additions & 1 deletion cmd/offlinesync/offlinesync.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ func SyncOfflineActivity(v *viper.Viper, queueFilepath string) error {
return err
}

cmdheartbeat.ResetRateLimit(v)
err = cmdheartbeat.ResetRateLimit(v)
if err != nil {
log.Errorln(err)
}

return nil
}

0 comments on commit 1e98bdb

Please sign in to comment.