Skip to Content
Learn Rails 5.2: Accelerated Web Development with Ruby on Rails
book

Learn Rails 5.2: Accelerated Web Development with Ruby on Rails

by Stefan Wintermeyer
April 2018
Beginner to intermediate
444 pages
7h 35m
English
Apress
Content preview from Learn Rails 5.2: Accelerated Web Development with Ruby on Rails
© Stefan Wintermeyer 2018
Stefan WintermeyerLearn Rails 5.2https://doi.org/10.1007/978-1-4842-3489-1_10

10. Active Job

Stefan Wintermeyer1 
(1)
Bochum, Germany
 

Sometimes a specific piece of code takes a long time to run but doesn’t need to run right away. An example is sending an e-mail after creating an order at the end of an online shopping workflow. It can take a long time to send an e-mail, but you don’t want your user to wait for that to happen within the controller. It makes more sense to use a queueing mechanism for these tasks.

Active Job provides such a queueing system. You can create jobs that are processed asynchronously by the active job.

Create a New Job

The quickest way to create a new job is to use the job generator. Let’s create an ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn Rails 6: Accelerated Web Development with Ruby on Rails

Learn Rails 6: Accelerated Web Development with Ruby on Rails

Adam Notodikromo
Agile Web Development with Rails 5.1

Agile Web Development with Rails 5.1

Sam Ruby, David B. Copeland, Dave Thomas
Rails 4 in Action

Rails 4 in Action

Yehuda Katz, Rebecca Skinner, Stephen Klabnik, Ryan Bigg

Publisher Resources

ISBN: 9781484234891Purchase LinkPublisher Website