Skip to content

[Deferred] Dead task listing - #403

Open
alex-rogachev wants to merge 4 commits into
rage-rb:mainfrom
alex-rogachev:deferred-dead-tasks-listing
Open

alex-rogachev wants to merge 4 commits into
rage-rb:mainfrom
alex-rogachev:deferred-dead-tasks-listing

Conversation

@alex-rogachev

@alex-rogachev alex-rogachev commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Add an API for listing and inspecting deferred tasks that have exhausted their retries.

  • Use Rage::Deferred.dead_tasks to list dead tasks
  • Use find_by_id to find a specific task
  • Inspect failure details and lazily load the original arguments
  • Keep standard Enumerable behavior, including find and detect
  • Support both Disk and Nil backends
    For the Disk backend, read from a stable snapshot, tolerate corrupted records, and select the newest valid record when duplicate task IDs exist. Keep locks short-lived and allow independent Fiber-based traversals.

@alex-rogachev
alex-rogachev marked this pull request as draft October 2, 2026 20:04
@alex-rogachev
alex-rogachev force-pushed the deferred-dead-tasks-listing branch 5 times, most recently from 1aa7849 to a8b49fa Compare October 5, 2026 18:43
alex-rogachev and others added 2 commits October 5, 2026 20:03
Co-authored-by: Serhii Sadovskyi <sadovsky.sb@gmail.com>
Co-authored-by: Serhii Sadovskyi <sadovsky.sb@gmail.com>
@alex-rogachev
alex-rogachev force-pushed the deferred-dead-tasks-listing branch from 552b402 to 102f12f Compare October 5, 2026 20:03
@alex-rogachev
alex-rogachev marked this pull request as ready for review October 5, 2026 20:15
Co-authored-by: Serhii Sadovskyi <sadovsky.sb@gmail.com>
@alex-rogachev
alex-rogachev force-pushed the deferred-dead-tasks-listing branch from 78f15d5 to 8521e86 Compare October 6, 2026 06:47
@serhii-sadovskyi
serhii-sadovskyi force-pushed the deferred-dead-tasks-listing branch from 2017830 to e182e15 Compare October 8, 2026 11:24
`each` and `find_by_id` now rescue `Marshal.load` errors and print
the task ID. `each` continues with the next record, and `find_by_id`
returns `nil`.

Co-authored-by: Alex Rohachev <sasha.rogachev.workmail@gmail.com>
@serhii-sadovskyi
serhii-sadovskyi force-pushed the deferred-dead-tasks-listing branch from e182e15 to 305d7de Compare October 8, 2026 15:42

This branch has not been deployed

No deployments
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