Module: LifeBoat::ResqueCallbacks

Defined in:
lib/lifeboat.rb

Instance Method Summary collapse

Instance Method Details

#create_resque_lifeboatObject



57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/lifeboat.rb', line 57

def create_resque_lifeboat
 if RAILS_ENV == "testing"
   self.create_lifeboat
 else
   begin
     Resque.enqueue(RescateLifeBoat, :create_lifeboat ,self.class.name, self.id)
   rescue => e
     puts "Captain! There was a problem sending the Lifeboats"
     puts e
   end
 end
end

#destroy_resque_lifeboatObject



70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/lifeboat.rb', line 70

def destroy_resque_lifeboat
  if RAILS_ENV == "testing"
    self.destroy_lifeboat
  else
    begin
      Resque.enqueue(RescateLifeBoat, :destroy_lifeboat, self.class.name, self.id)
    rescue => e
     puts "Captain! There was a problem sending the Lifeboats"
     puts e
    end
  end
end

#update_resque_lifeboatObject



83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/lifeboat.rb', line 83

def update_resque_lifeboat
  if RAILS_ENV == "testing"
    self.update_lifeboat
  else
    begin
      Resque.enqueue(RescateLifeBoat, :update_lifeboat ,self.class.name, self.id)
    rescue => e
      puts "Captain! There was a problem sending the Lifeboats"
      puts e
    end
  end
end