Commit 64904f5
authored
fix(cloudflare): calculate retries not attempts (#16834)
The `message.attempts` property starts at 1 so we were calculating the
number of attempts not the number of retries. Attempt 2 is the first
retry not attempt 1.
Currently the retry count is the same as the number of messages in the
batch this way:

Additionally this causes the error rate to be quite nice and I have been
assured my code is not THAT bad:

See:
https://developers.cloudflare.com/queues/configuration/javascript-apis/1 parent 95c4fe3 commit 64904f5
2 files changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
179 | 182 | | |
180 | 183 | | |
181 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
843 | 843 | | |
844 | 844 | | |
845 | 845 | | |
846 | | - | |
| 846 | + | |
847 | 847 | | |
848 | 848 | | |
849 | 849 | | |
| |||
0 commit comments