April 2018
Beginner to intermediate
444 pages
7h 35m
English
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.
The quickest way to create a new job is to use the job generator. Let’s create an ...