Skip to content

Tell one story through the batches README section - #12

Open
jpcamara wants to merge 3 commits into
mainfrom
batch-docs-improvements
Open

Tell one story through the batches README section#12
jpcamara wants to merge 3 commits into
mainfrom
batch-docs-improvements

Conversation

@jpcamara

Copy link
Copy Markdown
Owner

Ports the documentation improvements from the Active Job guide PR (jpcamara/rails#1) back to the README's batch section, applying the ones that fit the README's terser register.

What changed

  • The example is now the story the section tells. The intro gains the motivating use case (import a file row by row, notify at the end), and the example becomes exactly that: a batch described as "Nightly imports" running ImportRowJobs, with ImportFinishedJob / ImportSucceededJob / ImportFailedJob replacing the sleepy placeholder jobs. Each callback still logs a different counter, and the example now includes description:, which the prose below refers to.
  • Dropped the "doesn't pass them any arguments" aside from the callbacks intro. It answered a question only someone who knew the pre-release API (def perform(batch)) or Sidekiq Pro's (status, options) callbacks would ask. The configured-instance paragraph two beats later (ImportSucceededJob.new("some argument")) carries the arguments story.
  • The upgrade section anchors to version 1.7 instead of "before batches existed", so it stays checkable against a Gemfile.lock and doesn't quietly go stale when 2.0 folds batches into the base schema.

What deliberately wasn't ported

The guide's "In the above example:" walkthrough and its one-idea-per-sentence pacing — that's the guide's teaching register; the README's compression is its own house style, and Rosa's membership bullets here already solve what the guide rework solved.

Content is otherwise unchanged: no factual claims added or removed.

jpcamara and others added 3 commits August 24, 2026 16:52
The section opens by motivating batches with a row-by-row import, so the
example is now that import: a batch described as nightly imports running
ImportRowJobs, with callbacks named for when they run, each still logging
a different counter. Drop the aside about callbacks receiving no
arguments, which answered a question the section never raises—the
configured-instance paragraph carries the arguments story. Anchor the
upgrade instructions to version 1.7 so they date themselves.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Completion is detected from the batch's outstanding jobs, and most of
the counters are computed at read time—the columns are only written when
the batch finishes. Claiming the batch tracks progress with them
described the reporting API as the mechanism.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The tables batches use was a noun pileup; say what the reader is missing
and then what to run.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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