skyeye 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/skyeye/exec.rb +16 -15
- data/lib/skyeye/version.rb +1 -1
- metadata +1 -1
data/lib/skyeye/exec.rb
CHANGED
@@ -225,23 +225,24 @@ module SkyEye
|
|
225
225
|
if watch[:command]
|
226
226
|
command = watch[:command]
|
227
227
|
message = nil
|
228
|
-
|
229
|
-
status = Open4::popen4(command) do |pid, stdin, stdout, stderr|
|
230
|
-
message = "#{watch[:name]} :: #{stdout.readlines.join(" ").gsub(/\n/, " ").chomp} :: #{stderr.readlines.join(" ").gsub(/\n/, " ").chomp}"
|
231
|
-
end
|
232
|
-
|
233
|
-
case status
|
234
|
-
when 0
|
235
|
-
@logger.info message
|
236
|
-
when 1
|
237
|
-
@logger.warn message
|
238
|
-
when 2
|
239
|
-
@logger.error message
|
240
|
-
else
|
241
|
-
@logger.warn message
|
242
|
-
end
|
228
|
+
status = nil
|
243
229
|
|
244
230
|
@mutex.synchronize do
|
231
|
+
status = Open4::popen4(command) do |pid, stdin, stdout, stderr|
|
232
|
+
message = "#{watch[:name]} :: #{stdout.readlines.join(" ").gsub(/\n/, " ").chomp} :: #{stderr.readlines.join(" ").gsub(/\n/, " ").chomp}"
|
233
|
+
end
|
234
|
+
|
235
|
+
case status
|
236
|
+
when 0
|
237
|
+
@logger.info message
|
238
|
+
when 1
|
239
|
+
@logger.warn message
|
240
|
+
when 2
|
241
|
+
@logger.error message
|
242
|
+
else
|
243
|
+
@logger.warn message
|
244
|
+
end
|
245
|
+
|
245
246
|
cw = AWS::CloudWatch.new.client
|
246
247
|
|
247
248
|
cw.put_metric_data({
|
data/lib/skyeye/version.rb
CHANGED