Last active
August 29, 2015 14:07
-
-
Save nihtalak/84ae13541f2979a853e9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Active Job | |
| # Changed enqueueing method from +enqueue+ to +perform_later+ | |
| # beta1 | |
| MyJob.enqueue(*args) | |
| # beta2 | |
| MyJob.perform_later(*args) | |
| # Changed the way we schedule jobs | |
| # beta1 | |
| MyJob.enqueue_at Date.tomorrow.noon, record | |
| MyJob.enqueue_in 1.week, record | |
| # beta2 | |
| MyJob.set(wait_until: Date.tomorrow.noon).perform_later(record) | |
| MyJob.set(wait: 1.week).perform_later(record) | |
| # with this change we also added the ability to specify on which queue to run the job | |
| MyJob.set(queue: :low_priority).perform_later(record) | |
| # ActionMailer | |
| # Changed the options keys you can give to +deliver_later+ and +deliver_later!+ | |
| # :in becomes :wait and at: becomes :wait_until | |
| # beta1 | |
| Notifier.welcome(User.first).deliver_later!(in: 1.hour) | |
| Notifier.welcome(User.first).deliver_later!(at: 10.hours.from_now) | |
| # beta2 | |
| Notifier.welcome(User.first).deliver_later!(wait: 1.hour) | |
| Notifier.welcome(User.first).deliver_later!(wait_until: 10.hours.from_now) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment