-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Signed-off-by: Alex Collins <alex_collins@intuit.com>
- Loading branch information
Showing
5 changed files
with
51 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package controller | ||
|
||
import ( | ||
"time" | ||
|
||
"k8s.io/client-go/util/workqueue" | ||
|
||
"github.com/argoproj/argo/util/env" | ||
) | ||
|
||
type fixedItemIntervalRateLimiter struct{} | ||
|
||
func (r *fixedItemIntervalRateLimiter) When(interface{}) time.Duration { | ||
return env.LookupEnvDurationOr("DEFAULT_REQUEUE_TIME", 2*time.Second) | ||
} | ||
|
||
func (r *fixedItemIntervalRateLimiter) Forget(interface{}) {} | ||
|
||
func (r *fixedItemIntervalRateLimiter) NumRequeues(interface{}) int { | ||
return 1 | ||
} | ||
|
||
var _ workqueue.RateLimiter = &fixedItemIntervalRateLimiter{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters