Sha256: 4b79e79e10fd0c0cf151c26a365c622f295412a1e21d7058f0e9382d281f44e0
Contents?: true
Size: 1.98 KB
Versions: 5
Compression:
Stored size: 1.98 KB
Contents
class LogError < ApplicationRecord belongs_to :log_error_type after_create :telegram_me private def telegram_me require 'telegram' telegram = Telegram.new telegram.sendSticker :dog, :tech message = "#{I18n.l self.date, format: :long} в #{self.log_error_type.value} замечена проблема на #{CONFIG[:domain]} ! #{self.value} " telegram.sendMessage message, :tech # LogMailer.error(self).deliver_later # # - @error.split(/\n/).each do |str| # - if /Failed|Exists|Error|ROLLBACK|Completed 400|Completed 500|RoutingError/ =~ str # dvi.log_err # = str # - elsif /Goodbye|shutdown|Gracefully|startup|INFO/ =~ str # dvi.log_puma # = str # - elsif /WARNING/ =~ str # dvi.log_warning # = str # - elsif /ActiveJob/ =~ str # dvi.log_active_job # = str # - elsif /WebSocket|Channel/ =~ str # dvi.log_action_cable # = str # - elsif /SELECT|INSERT INTO|UPDATE|BEGIN|DELETE|COMMIT|ActiveRecord/ =~ str # dvi.log_active_record # = str # - elsif /Parameters/ =~ str # dvi.log_params # = str # - elsif /Started|Processing|Redirected|DEBUG/ =~ str # dvi.log_processing # = str # - elsif /Completed/ =~ str # dvi.log_processing_end # = str # - else # = str # br end end
Version data entries
5 entries across 5 versions & 1 rubygems