@@ -747,24 +747,24 @@ jobs as arguments (note that this is different from `perform_later`).
747
747
` perform_all_later ` does call ` perform ` under the hood. The arguments passed to
748
748
` new ` will be passed on to ` perform ` when it's eventually called.
749
749
750
- Here is an example calling ` perform_all_later ` with ` GuestCleanupJob ` instances:
750
+ Here is an example calling ` perform_all_later ` with ` GuestsCleanupJob ` instances:
751
751
752
752
``` ruby
753
753
# Create jobs to pass to `perform_all_later`.
754
754
# The arguments to `new` are passed on to `perform`
755
- guest_cleanup_jobs = Guest .all.map { |guest | GuestsCleanupJob .new (guest) }
755
+ cleanup_jobs = Guest .all.map { |guest | GuestsCleanupJob .new (guest) }
756
756
757
- # Will enqueue a separate job for each instance of `GuestCleanupJob `
758
- ActiveJob .perform_all_later(guest_cleanup_jobs )
757
+ # Will enqueue a separate job for each instance of `GuestsCleanupJob `
758
+ ActiveJob .perform_all_later(cleanup_jobs )
759
759
760
760
# Can also use `set` method to configure options before bulk enqueuing jobs.
761
- guest_cleanup_jobs = Guest .all.map { |guest | GuestsCleanupJob .new (guest).set(wait: 1 .day) }
761
+ cleanup_jobs = Guest .all.map { |guest | GuestsCleanupJob .new (guest).set(wait: 1 .day) }
762
762
763
- ActiveJob .perform_all_later(guest_cleanup_jobs )
763
+ ActiveJob .perform_all_later(cleanup_jobs )
764
764
```
765
765
766
766
` perform_all_later ` logs the number of jobs successfully enqueued, for example
767
- if ` Guest.all.map ` above resulted in 3 ` guest_cleanup_jobs ` , it would log
767
+ if ` Guest.all.map ` above resulted in 3 ` cleanup_jobs ` , it would log
768
768
` Enqueued 3 jobs to Async (3 GuestsCleanupJob) ` (assuming all were enqueued).
769
769
770
770
The return value of ` perform_all_later ` is ` nil ` . Note that this is different
0 commit comments