Skip to content

Add RetryOrDie callback support#23

Merged
rgalanakis merged 2 commits into
mainfrom
retry-or-die-callback
Nov 13, 2025
Merged

Add RetryOrDie callback support#23
rgalanakis merged 2 commits into
mainfrom
retry-or-die-callback

Conversation

@rgalanakis

Copy link
Copy Markdown
Member

Callers can provide a subclass with two methods that are looked for:

If on_retry is defined, it is called with (worker instance, job hash). If on_retry returns +:skip+, do NOT retry (do not send to the retry set).

If on_die is defined, it is called with (worker instance, job hash). If on_die returns +:skip+, do NOT send to the dead set.

Callers can provide a subclass with two methods that are looked for:

If on_retry is defined, it is called with (worker instance, job hash).
If on_retry returns +:skip+, do NOT retry (do not send to the retry set).

If on_die is defined, it is called with (worker instance, job hash).
If on_die returns +:skip+, do NOT send to the dead set.
Also add an explicit test for `.to_not publish` (with no name)
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@1209a10). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #23   +/-   ##
=======================================
  Coverage        ?   98.28%           
=======================================
  Files           ?       36           
  Lines           ?     2626           
  Branches        ?        0           
=======================================
  Hits            ?     2581           
  Misses          ?       45           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rgalanakis rgalanakis merged commit 638fb05 into main Nov 13, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants