Skip to content

Commit f7a1a7b

Browse files
committed
Update doc to reflect current feature state
* Remove multi step job example since we don't handle hierarchy anymore for the time being
1 parent 3c41cb4 commit f7a1a7b

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

README.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,6 @@ and optionally trigger callbacks based on their status. It supports the followin
598598
- `on_success`: Fired when all jobs have succeeded, including retries. Will not fire if any jobs have failed, but will fire if jobs have been discarded using `discard_on`
599599
- `on_failure`: Fired when all jobs have finished, including retries. Will only fire if one or more jobs have failed.
600600
- If a job is part of a batch, it can enqueue more jobs for that batch using `batch#enqueue`
601-
- Batches can be nested within other batches, creating a hierarchy. Outer batches will not fire callbacks until all nested jobs have finished.
602601
- Attaching arbitrary metadata to a batch
603602

604603
```rb
@@ -609,20 +608,6 @@ class SleepyJob < ApplicationJob
609608
end
610609
end
611610
612-
class MultiStepJob < ApplicationJob
613-
def perform
614-
batch.enqueue do
615-
SleepyJob.perform_later(5)
616-
# Because of this nested batch, the top-level batch won't finish until the inner,
617-
# 10 second job finishes
618-
# Both jobs will still run simultaneously
619-
SolidQueue::Batch.enqueue do
620-
SleepyJob.perform_later(10)
621-
end
622-
end
623-
end
624-
end
625-
626611
class BatchFinishJob < ApplicationJob
627612
def perform(batch) # batch is always the default first argument
628613
Rails.logger.info "Good job finishing all jobs"
@@ -653,12 +638,9 @@ end
653638

654639
### Batch options
655640

656-
As part of the processing of a batch, some jobs are automatically enqueued:
657-
658-
- A `SolidQueue::Batch::BatchMonitorJob` is enqueued for every `Batch` being processed
659-
- In the case of an empty batch, a `SolidQueue::Batch::EmptyJob` is enqueued
641+
In the case of an empty batch, a `SolidQueue::Batch::EmptyJob` is enqueued.
660642

661-
By default, these jobs run on the `default` queue. You can specify an alternative queue for them in an initializer:
643+
By default, this jobs run on the `default` queue. You can specify an alternative queue for it in an initializer:
662644

663645
```rb
664646
Rails.application.config.after_initialize do # or to_prepare

0 commit comments

Comments
 (0)