Class: WebHookEvent
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- WebHookEvent
- Defined in:
- app/models/web_hook_event.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.purge_old ⇒ Object
15 16 17 |
# File 'app/models/web_hook_event.rb', line 15 def self.purge_old where("created_at < ?", SiteSetting.retain_web_hook_events_period_days.days.ago).delete_all end |
Instance Method Details
#update_web_hook_delivery_status ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'app/models/web_hook_event.rb', line 19 def update_web_hook_delivery_status web_hook.last_delivery_status = case status when 200..299 WebHook.last_delivery_statuses[:successful] else WebHook.last_delivery_statuses[:failed] end web_hook.save! end |