Skip to content

Commit

Permalink
chore: modify initial resource update
Browse files Browse the repository at this point in the history
  • Loading branch information
xishang0128 committed Jan 24, 2024
1 parent 5c1404f commit ea4be9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions component/resource/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ func (f *Fetcher[V]) Destroy() error {

func (f *Fetcher[V]) pullLoop() {
initialInterval := f.interval - time.Since(f.UpdatedAt)
if initialInterval < minInterval {
initialInterval = minInterval
if initialInterval > f.interval {
initialInterval = f.interval
}

timer := time.NewTimer(initialInterval)
Expand Down

0 comments on commit ea4be9b

Please sign in to comment.