Skip to content

Commit 0ce1925

Browse files
committed
move retry backoff block in readme
1 parent ebde9e8 commit 0ce1925

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,22 @@ type OnError struct {
7474
- `RetryDelay`: The initial delay (in seconds) before the first retry attempt. This delay can be modified by the `RetryBackoff` strategy.
7575
- `RetryBackoff`: Specifies the strategy used to increase the delay between subsequent retries.
7676

77+
#### Retry Backoff Strategies
78+
79+
The RetryBackoff constant defines the available strategies for increasing retry delays:
80+
81+
```go
82+
const (
83+
RETRY_BACKOFF_NONE = "none"
84+
RETRY_BACKOFF_LINEAR = "linear"
85+
RETRY_BACKOFF_EXPONENTIAL = "exponential"
86+
)
87+
```
88+
89+
- `RETRY_BACKOFF_NONE`: No backoff. The RetryDelay remains constant for all retries.
90+
- `RETRY_BACKOFF_LINEAR`: The retry delay increases linearly with each attempt (e.g., delay, 2*delay, 3*delay).
91+
- `RETRY_BACKOFF_EXPONENTIAL`: The retry delay increases exponentially with each attempt (e.g., delay, delay*2, delay*2*2).
92+
7793
---
7894

7995
## Job options
@@ -105,22 +121,6 @@ type OnError struct {
105121
}
106122
```
107123

108-
#### Retry Backoff Strategies
109-
110-
The RetryBackoff constant defines the available strategies for increasing retry delays:
111-
112-
```go
113-
const (
114-
RETRY_BACKOFF_NONE = "none"
115-
RETRY_BACKOFF_LINEAR = "linear"
116-
RETRY_BACKOFF_EXPONENTIAL = "exponential"
117-
)
118-
```
119-
120-
- `RETRY_BACKOFF_NONE`: No backoff. The RetryDelay remains constant for all retries.
121-
- `RETRY_BACKOFF_LINEAR`: The retry delay increases linearly with each attempt (e.g., delay, 2*delay, 3*delay).
122-
- `RETRY_BACKOFF_EXPONENTIAL`: The retry delay increases exponentially with each attempt (e.g., delay, delay*2, delay*2*2).
123-
124124
### Schedule
125125

126126
The Schedule struct is used to define recurring jobs.

0 commit comments

Comments
 (0)