sidekiq test job can raise an exception

This commit is contained in:
simon lehericey 2023-11-22 09:56:05 +01:00
parent 9f6cff07e4
commit 1880a15d69

View file

@ -2,7 +2,10 @@ class SidekiqAgainJob < ApplicationJob
self.queue_adapter = :sidekiq
queue_as :default
def perform(user)
def perform(user, with_exception: false)
if with_exception
raise 'Nop'
end
Sentry.capture_message('this is a message from sidekiq')
UserMailer.new_account_warning(user).deliver_now
end