( max: Duration.Input )
| 2657 | * @since 4.1.8 |
| 2658 | */ |
| 2659 | export const retryAfterAtMost = ( |
| 2660 | max: Duration.Input |
| 2661 | ): <Input>(metadata: Schedule.InputMetadata<Input>) => boolean => { |
| 2662 | const limit = Duration.fromInputUnsafe(max) |
| 2663 | return ({ input, now }) => { |
| 2664 | const delay = retryAfterDelay(now, retryAfterHeaderOf(input)) |
| 2665 | return delay === undefined || Duration.isLessThanOrEqualTo(delay, limit) |
| 2666 | } |
| 2667 | } |
| 2668 | |
| 2669 | const withRetryAfter = <ES, R1>( |
| 2670 | schedule: Schedule.Schedule<unknown, any, ES, R1> |
nothing calls this directly
no test coverage detected