Module: Panicker
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/concerns/panicker.rb
Instance Method Summary collapse
Instance Method Details
#message(text_to_send = '', bot: nil, target: nil, txt: nil) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'app/models/concerns/panicker.rb', line 6 def (text_to_send = '', bot: nil, target: nil, txt: nil) txt ||= text_to_send Rails.logger.warn "Posting for company #{code}, target: #{target}, message: #{txt}, not_markdown: true" PanickerApi.(text_to_send, bot: bot, target: target, txt: txt, company: self) rescue Rails.logger.error "Silently failing sending panicker a message #{txt} for company #{code}" Rails.logger.error $! end |