Class: RedAlert::Sidekiq::Notifier

Inherits:
Object
  • Object
show all
Includes:
Notifier
Defined in:
lib/red_alert/sidekiq/notifier.rb

Instance Method Summary collapse

Methods included from Notifier

#alert, #filter_keys, included, #notifier_settings

Instance Method Details

#templateObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/red_alert/sidekiq/notifier.rb', line 6

def template
"A <%= exception.class %> occured: <%= exception %>\n\n===================================================================\nMessage:\n===================================================================\n\n<%= data[:message].to_a.\n  sort{|a,b| a.first <=> b.first}.\n  map{ |k,v| \"%-25s%p\" % [k+':', v] }.\n  join(\"\\n  \") %>\n\n===================================================================\nSidekiq Environment:\n===================================================================\n\n  PID:                     <%= $$ %>\n  PWD:                     <%= Dir.getwd %>\n\n  Worker Class:            <%= data[:worker_class] %>\n  Queue:                   <%= data[:queue] %>\n\n<% if exception.respond_to?(:backtrace) %>\n===================================================================\nBacktrace:\n===================================================================\n\n  <%= exception.backtrace.join(\"\\n  \") %>\n<% end %>\n"
end