chef-rabbit 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/chef/rabbit.rb +14 -16
- data/lib/chef/rabbit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZGJhNjQ0ZGJiNTE1NjQ0YTRhMmNlMDBhOWRmMTEwN2UwYTAxYTgyNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTZlMWNmODIwYWQzZTAwNjVhZDNiY2Q0YTk1YjhmMTRmZmViNzg3NA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDYxZWNmMmQ0ZTI0ZDA1MmY3MmRmYzBmMmM2YTM5Njc1MWMwY2YzZTA1NDU0
|
10
|
+
M2Q1MjQ1NTFmMmM5YzQ0NjU5YjNlODY2YzZmYjQzNjM1Mjc0YmFhNWU2ZWQ5
|
11
|
+
YjlhNDNkMWFkODM3NjRjNWVhZTczY2UxMWRiZWM4NjRmYTBlOTA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZjE5NzdlMTRlYzBmZTJmOTlkNzY1NWIwN2E1YjJkNDhlMzNlMmUwNWYxMTE5
|
14
|
+
YjNkZDVkNzNmNTIzNjY1YWUzYWIwYjc0NzUxOGZiNTRhNGZjODA0MTUzOTE0
|
15
|
+
MTcxOTE1NzE5ZGI4NzAzMzc4YzQ2Y2UyZTA4MTk0YjZhODE2Nzc=
|
data/lib/chef/rabbit.rb
CHANGED
@@ -58,23 +58,21 @@ class Chef
|
|
58
58
|
timestamp = (@options[:timestamp_tag] == nil) ? "timestamp" : @options[:timestamp_tag]
|
59
59
|
|
60
60
|
if run_status.failed?
|
61
|
-
|
62
|
-
|
63
|
-
{
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
:routing_key => @options[:queue][:name])
|
61
|
+
message = {
|
62
|
+
timestamp.to_sym => Time.now.getutc.to_s,
|
63
|
+
:short_message => "Chef run failed on #{node.name}. Updated #{changes[:count]} resources.",
|
64
|
+
:full_message => run_status.formatted_exception + "\n" + Array(backtrace).join("\n") + changes[:message]
|
65
|
+
}
|
66
|
+
Chef::Log.debug "Notifying Rabbit server of failure: #{message.pretty_inspect}"
|
67
|
+
exchange.publish(message.to_json, :routing_key => @options[:queue][:name])
|
69
68
|
else
|
70
|
-
|
71
|
-
|
72
|
-
{
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
:routing_key => @options[:queue][:name])
|
69
|
+
message = {
|
70
|
+
timestamp.to_sym => Time.now.getutc.to_s,
|
71
|
+
:short_message => "Chef run completed on #{node.name} in #{elapsed_time}. Updated #{changes[:count]} resources.",
|
72
|
+
:full_message => changes[:message]
|
73
|
+
}
|
74
|
+
Chef::Log.debug "Notifying Rabbit server of success: #{message.pretty_inspect}"
|
75
|
+
exchange.publish(message.to_json, :routing_key => @options[:queue][:name])
|
78
76
|
end
|
79
77
|
|
80
78
|
connection.close
|
data/lib/chef/rabbit/version.rb
CHANGED