lib/loggly.rb in loggly-0.3.0 vs lib/loggly.rb in loggly-0.4.0
- old
+ new
@@ -8,11 +8,11 @@
class LogglyResque
@queue = :loggly
def self.perform(klass,message, time=nil)
- klass.send(:send_to_loggly, message, time)
+ klass.camelize.constantize.send(:send_to_loggly, message, time)
end
end
#
# THIS CLASS AS AN ABSTRACT BASE CLASS TO SEND EVENTS TO LOGGLY.COM
@@ -69,11 +69,12 @@
# Public
#
# This method behaves the same as record, but uses resque to send the message.
#
def self.async_record(message, time=nil)
+
begin
- Resque.enqueue(LogglyResque, self, message, time)
+ Resque.enqueue(LogglyResque, self.name, message, time)
rescue => e
puts e
puts "There was an error cueing loggly"
end
end