Commit de4ecd8
committed
docs(retries): mark dead RetryPolicy timing fields as deprecated
`RetryPolicy.{initial_delay, max_delay, backoff_multiplier, jitter_factor}`
were stored on the struct but never reached graphile_worker — only
`max_attempts` is forwarded by `From<JobSpec> for GraphileJobSpec`.
graphile_worker uses a hard-coded `exp(min(attempts, 10))` second SQL
formula for every retry. So `RetryPolicy::fast()` and
`RetryPolicy::conservative()` produced identical retry timing in practice
even though the docs promised "100ms-30s delays" vs. "1 min - 8 hour
delays".
This commit makes the fact match the promise:
- Marks the unused math helpers (`RetryPolicy::new`, `with_jitter`,
`calculate_delay`, `calculate_retry_time`, and `JobSpec::calculate_retry_time`)
as `#[deprecated(since = "1.2.0")]` with notes pointing users at
`RetryPolicy { max_attempts: n, ..Default::default() }` or the presets.
- Rewrites the rustdoc on `RetryPolicy`, on each preset, on the
`with_*_retries` builders, and on the `enqueue_*_with_retries`
convenience helpers to describe what actually happens (only
`max_attempts` differs across presets, fixed exp-backoff timing).
- Updates the lib.rs module-level rustdoc.
- Migrates `examples/enqueue_jobs.rs` to the recommended pattern so it
doesn't trigger the new deprecation warnings.
- Updates README.md to drop the false delay-range claims and replace
the wrong "Pre-configured Fast/Bulk queues" / "Custom(name)" listing
with the actual `Queue::Parallel` / `Queue::Serial(name)` enum.
- Updates docs/02-dlq.md to mark the post-#9 "queue_name shows as
default" warning as resolved (it was the change in v1.1.1 that fixed
this).
The struct fields themselves stay public for source-compatibility with
existing struct-literal construction. Per-job backoff customization needs
upstream graphile_worker support and is deferred.1 parent cc7f981 commit de4ecd8
5 files changed
Lines changed: 224 additions & 72 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
29 | 50 | | |
30 | 51 | | |
31 | 52 | | |
32 | 53 | | |
33 | 54 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
44 | 76 | | |
45 | 77 | | |
46 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
880 | 880 | | |
881 | 881 | | |
882 | 882 | | |
883 | | - | |
| 883 | + | |
884 | 884 | | |
885 | | - | |
| 885 | + | |
886 | 886 | | |
887 | | - | |
888 | | - | |
889 | | - | |
890 | | - | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
891 | 893 | | |
892 | | - | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
893 | 898 | | |
894 | 899 | | |
895 | 900 | | |
| |||
929 | 934 | | |
930 | 935 | | |
931 | 936 | | |
932 | | - | |
| 937 | + | |
933 | 938 | | |
934 | 939 | | |
935 | 940 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
259 | 260 | | |
260 | 261 | | |
261 | 262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
| |||
362 | 368 | | |
363 | 369 | | |
364 | 370 | | |
365 | | - | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
366 | 376 | | |
367 | 377 | | |
368 | 378 | | |
369 | 379 | | |
370 | 380 | | |
371 | 381 | | |
372 | | - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
373 | 387 | | |
374 | 388 | | |
375 | 389 | | |
376 | 390 | | |
377 | 391 | | |
378 | 392 | | |
379 | 393 | | |
380 | | - | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
381 | 398 | | |
382 | 399 | | |
383 | 400 | | |
384 | 401 | | |
385 | 402 | | |
386 | 403 | | |
387 | 404 | | |
388 | | - | |
| 405 | + | |
389 | 406 | | |
390 | 407 | | |
391 | 408 | | |
392 | 409 | | |
393 | 410 | | |
394 | 411 | | |
395 | 412 | | |
396 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
397 | 417 | | |
398 | 418 | | |
399 | 419 | | |
400 | 420 | | |
401 | | - | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
402 | 431 | | |
403 | 432 | | |
404 | 433 | | |
| 434 | + | |
405 | 435 | | |
406 | 436 | | |
407 | 437 | | |
| |||
504 | 534 | | |
505 | 535 | | |
506 | 536 | | |
507 | | - | |
| 537 | + | |
508 | 538 | | |
509 | | - | |
510 | | - | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
511 | 543 | | |
512 | 544 | | |
513 | 545 | | |
| |||
527 | 559 | | |
528 | 560 | | |
529 | 561 | | |
530 | | - | |
| 562 | + | |
531 | 563 | | |
532 | | - | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
533 | 568 | | |
534 | 569 | | |
535 | 570 | | |
| |||
549 | 584 | | |
550 | 585 | | |
551 | 586 | | |
552 | | - | |
| 587 | + | |
| 588 | + | |
553 | 589 | | |
554 | | - | |
555 | | - | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
556 | 594 | | |
557 | 595 | | |
558 | 596 | | |
| |||
0 commit comments