lib/app_monit/event.rb in app_monit-0.0.2 vs lib/app_monit/event.rb in app_monit-0.0.3
- old
+ new
@@ -11,9 +11,10 @@
raise error unless AppMonit::Config.fail_silent
false
end
def self.create!(name, data_hash = {})
+ return false unless AppMonit::Config.enabled?
created_at = data_hash.delete(:created_at) || Time.now.utc
message = { created_at: created_at, name: name, payload: data_hash }
client.post('/v1/events', message)
end