Reputation: 484
What is the difference between delayed job and active job in Ruby on Rails? Why should I use delayed job if active job is present? I have tried to find some more information but I have not been successful.
Upvotes: 6
Views: 3299
Reputation: 2009
ActiveJob
is very similar idea to ActiveRecord
.
ActiveRecord
is a wrapper. You can write code for it and then it decides how to execute it, depending which backend you're using.
ActiveJob
is just another wrapper. In this case DelayedJob
would be the backend that actually runs jobs. If down the road you decide to switch to something like Resque
or Sidekiq
, all your code should still work because translation is handled by ActiveJob
wrapper
Upvotes: 13