Function
normalizeForceRecoveryOptions
(options ForceRecoveryOptions)
Source from the content-addressed store, hash-verified
| 34 | } |
| 35 | |
| 36 | func normalizeForceRecoveryOptions(options ForceRecoveryOptions) ForceRecoveryOptions { |
| 37 | if options.RateLimitPerMinute <= 0 { |
| 38 | options.RateLimitPerMinute = DefaultForceRunRateLimitPerMinute |
| 39 | } |
| 40 | return options |
| 41 | } |
| 42 | |
| 43 | func (l *forceRunRateLimiter) allow(actor ActorIdentity, taskID string, now time.Time, limit int) bool { |
| 44 | if l == nil || limit <= 0 { |
Tested by
no test coverage detected