Skip to content

docs: document inspecting and editing batch slices from the console#52

Merged
reidmorrison merged 1 commit into
masterfrom
docs/batch-console-debugging
Jul 2, 2026
Merged

docs: document inspecting and editing batch slices from the console#52
reidmorrison merged 1 commit into
masterfrom
docs/batch-console-debugging

Conversation

@reidmorrison

Copy link
Copy Markdown
Owner

Summary

Expands the Batch Guide's console/debugging coverage. Previously the only documented way to inspect a batch job's slices was a single each_failed_record example. This adds two sections, all verified against lib/rocket_job/sliced/ and lib/rocket_job/batch/:

  • Inspecting slices from the console — counting slices (job.input.count, per-state .failed.count, etc.), fetching/iterating via the state scopes (queued/running/failed/completed) plus first/last/each/where, reading records and per-slice metadata (first_record_number, failure_count, failed_record, ...), inspecting the embedded JobException, and the previously-undocumented group_exceptions aggregation helper. Notes that it all applies to job.output and named categories.
  • Editing and retrying failed records — correcting a bad record in place (records is a plain Array; save! persists it) and retrying, including the resume-from-processing_record_number behavior and the key distinction: slice.retry! works while the job is still running, but a failed job needs job.retry! since workers only process slices for a running job.

Notes

  • Docs-only change (docs/batch.md), no code changes.
  • Follows existing kramdown conventions on the page: ~~~ruby tilde fences and bold-prose "Example:" labels so they stay out of the auto-generated TOC (the two new ## headings do appear in the TOC).

🤖 Generated with Claude Code

Expand the Batch Guide beyond the single each_failed_record example with
two new sections:

- Inspecting slices from the console: counting, fetching, and iterating
  slices via the state scopes (queued/running/failed/completed), reading
  records and per-slice metadata, inspecting the embedded exception, and
  the previously-undocumented group_exceptions summary helper.
- Editing and retrying failed records: correcting a bad record in place
  and retrying, with the running-job (slice.retry!) vs failed-job
  (job.retry!) distinction called out.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@reidmorrison reidmorrison merged commit 93c61e1 into master Jul 2, 2026
8 checks passed
@reidmorrison reidmorrison deleted the docs/batch-console-debugging branch July 2, 2026 02:14
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.

1 participant