diff options
Diffstat (limited to 'config/initializers/forbid_sidekiq_in_transactions.rb')
-rw-r--r-- | config/initializers/forbid_sidekiq_in_transactions.rb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/config/initializers/forbid_sidekiq_in_transactions.rb b/config/initializers/forbid_sidekiq_in_transactions.rb index 4cf1d455eb4..deb94d7dbce 100644 --- a/config/initializers/forbid_sidekiq_in_transactions.rb +++ b/config/initializers/forbid_sidekiq_in_transactions.rb @@ -27,16 +27,8 @@ module Sidekiq Use an `after_commit` hook, or include `AfterCommitQueue` and use a `run_after_commit` block instead. MSG rescue Sidekiq::Worker::EnqueueFromTransactionError => e - if Rails.env.production? - Rails.logger.error(e.message) - - if Gitlab::Sentry.enabled? - Gitlab::Sentry.context - Raven.capture_exception(e) - end - else - raise - end + ::Rails.logger.error(e.message) if ::Rails.env.production? + Gitlab::Sentry.track_exception(e) end end |