Skip to content

Commit

Permalink
put ticker duration into ticker instantiation instead of having an ow…
Browse files Browse the repository at this point in the history
…n variable for it
  • Loading branch information
stefan.rieckhof committed Jan 17, 2025
1 parent 855cc40 commit 04db2a5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions maintenance/failover/failover.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ func (a *ActivePassive) Run(ctx context.Context) error {
tryRefreshLock := time.NewTicker(a.timeToFailover)

// Ticker to try to acquire the lock if in passive or undefined state
tryAcquireInterval := 500 * time.Millisecond
tryAcquireLock := time.NewTicker(tryAcquireInterval)
tryAcquireLock := time.NewTicker(500 * time.Millisecond)

for {
select {
Expand Down

0 comments on commit 04db2a5

Please sign in to comment.