According to ActiveJob docs to enqueue a job I should use perform_later
. Sidekiq docs implement perform_async
, but the ActiveJob part of the docs suggests using perform_later
. I've used perform_async
previously in Rails, so do these differ in any way or is it just convention?
ActiveJob is a wrapper around the most known background job gems to provide a base API to work with background jobs.
ActiveJob defines perform_later
. Sidekiq defines perfom_async
. Which method you use depends on how you implemente your workers. If you use ActiveJob workers then you must use perform_later
, if you don't use ActiveJob and just go with plain Sidekiq workers then use perform_async
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With