2

I am using Sidekiq 3 in my ruby on rails 3.2 application. How can I handle exception in Sidekiq jobs without plugin (for example: Honeybadger, Airbrake, Rollbar, BugSnag). I want to catch exception that occurs in the job.

rubywebit
  • 65
  • 1
  • 8
  • Once you catch it, what do you want to do with it? – Bill Watts Jun 18 '14 at 16:05
  • I needed errors out of perform method. because continue working needed to know that jobs failed or is in progress. Finally I used sidekiq-status to get status of jobs. – rubywebit Jun 18 '14 at 19:45
  • Well if you want it to go into an interface you can use errbit linked below, which uses the Airbrake gem to catch errors. Other wise maybe create another sidekiq job to accept the errors that you rescue and do whatever logic you need to in that job. http://errbit.github.io/errbit/ – Bill Watts Jun 19 '14 at 14:28

1 Answers1

0

Bugsnag actually comes with built-in support for catching errors in both Sidekiq 2 and 3, so it will automatically detect any exceptions in your sidekiq jobs!

loopj
  • 1,599
  • 1
  • 15
  • 12