Class: Resque::Failure::Campfire

Inherits:
Base
  • Object
show all
Defined in:
lib/resque/failure/campfire.rb

Instance Method Summary collapse

Instance Method Details

#saveObject



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/resque/failure/campfire.rb', line 4

def save

  campfire = Tinder::Campfire.new(  Rails.configuration.smokesignal.domain, 
                                  :token  =>  Rails.configuration.smokesignal.token,
                                  :ssl    =>  true,
                                  :ssl_options => {:verify => Rails.configuration.smokesignal.ssl_verify ? Rails.configuration.smokesignal.ssl_verify : true })
  room = campfire.find_or_create_room_by_name(Rails.configuration.smokesignal.room)
  # todo work on body for paste
  room.paste  "smokesignal[#{Rails.env}] - queue: #{queue}\n" +
              exception.message + "\n" +
              exception.backtrace.join("\n")
end