Skip to content

Commit

Permalink
Merge pull request collectiveidea#709 from garethrees/patch-1
Browse files Browse the repository at this point in the history
Pluck emails instead of find/collect
  • Loading branch information
albus522 committed Sep 23, 2014
2 parents f9a07f4 + 79eb5aa commit 4bb1ce0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ NewsletterJob = Struct.new(:text, :emails) do
end
end

Delayed::Job.enqueue NewsletterJob.new('lorem ipsum...', Customers.find(:all).collect(&:email))
Delayed::Job.enqueue NewsletterJob.new('lorem ipsum...', Customers.pluck(:email))
```
To set a per-job max attempts that overrides the Delayed::Worker.max_attempts you can define a max_attempts method on the job
```ruby
Expand Down

0 comments on commit 4bb1ce0

Please sign in to comment.