Class: ExceptionNotification::Resque

Inherits:
Resque::Failure::Base
  • Object
show all
Defined in:
lib/exception_notification/resque.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.countObject



6
7
8
# File 'lib/exception_notification/resque.rb', line 6

def self.count
  Stat[:failed]
end

Instance Method Details

#saveObject



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/exception_notification/resque.rb', line 10

def save
  data = {
    :failed_at     => Time.now.to_s,
    :queue         => queue,
    :worker        => worker.to_s,
    :payload       => payload,
    :error_class   => exception.class.name,
    :error_message => exception.message
  }

  ExceptionNotifier.notify_exception(exception, :data => { :resque => data })
end