Disable automatic retry with ActiveJob, used with Sidekiq

As of sidekiq 6.0.1, it is possible to pass the following to an ActiveJob worker to prevent it from retrying: class ExampleJob < ActiveJob::Base sidekiq_options retry: false def perform(*args) # Perform Job end end More information: https://github.com/mperham/sidekiq/wiki/Active-Job#customizing-error-handling EDIT: According to this this requires Rails 6.0.1 or later as well.

How do I schedule recurring jobs in Active Job (Rails 4.2)?

Similar to rab3’s answer, since ActiveJob has support for callbacks, I was thinking of doing something like class MyJob < ActiveJob::Base after_perform do |job| # invoke another job at your time of choice self.class.set(:wait => 10.minutes).perform_later(job.arguments.first) end def perform(the_argument) # do your thing end end activejob callbacks

Sidekiq Rails 4.2 Use Active Job or Worker? What’s the difference

Short answer is they are the same thing. ActiveJob calls it a Job whereas Sidekiq calls it a Worker. I’ve decided to keep the terminology different so that people can distinguish the two. You can use either one. Note that ActiveJob does not provide access to the full set of Sidekiq options so if you … Read more

How to test ActionMailer deliver_later with rspec

If I understand you correctly, you could do: message_delivery = instance_double(ActionMailer::MessageDelivery) expect(ServiceMailer).to receive(:new_user).with(@user).and_return(message_delivery) allow(message_delivery).to receive(:deliver_later) The key thing is that you need to somehow provide a double for deliver_later.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)