brandonhilkert / sucker_punch

Sucker Punch is a Ruby asynchronous processing library using concurrent-ruby, heavily influenced by Sidekiq and girl_friday.
MIT License
2.65k stars 114 forks source link

pass arguments to exception hook so I know what exactly failed #118

Closed grosser closed 9 years ago

grosser commented 9 years ago

Just got an exception ... but not Idea what failed since I don't know the job arguments ... how about this interface ?

SuckerPunch.exception_handler { |ex, job_class, args| Rollbar.error(ex, "#{job_class}: #{args.join(' ')}") }

alternatively appending the exception message with the job arguments before sending it off

@brandonhilkert

brandonhilkert commented 9 years ago

PRs welcomed :+1:

grosser commented 9 years ago

looks like sucker_punch is not in control of the perform methods / we could not capture exceptions ... I was hoping to do SuckerPunch.exception_handler { |ex, job_class=nil, args=nil| and then let celluloid and suckerpunch call the same handler ...