class MailHandler::Receiving::Notification::Delay
delay happened
Public Instance Methods
notify(search)
click to toggle source
# File lib/mailhandler/receiving/notification/email/states.rb, line 52 def notify(search) if search.result change_notification_state(search, Received.new(context)) elsif max_time_to_notify?(search) change_notification_state(search, MaxDelay.new(context)) else send_notification_email(:delayed, search) end end
Private Instance Methods
max_time_to_notify?(search)
click to toggle source
# File lib/mailhandler/receiving/notification/email/states.rb, line 64 def max_time_to_notify?(search) Time.now - search.started_at >= context.max_time_to_notify end