Class: Nagios::RunnerAsync
Class Method Summary collapse
-
.check(params = {}) ⇒ Object
synchrony check, for manual call do not run in EM.
Methods inherited from Runner
Constructor Details
This class inherits a constructor from Nagios::Runner
Class Method Details
.check(params = {}) ⇒ Object
synchrony check, for manual call do not run in EM
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/nagios/runner_async.rb', line 7 def self.check(params = {}) raise "cant check sync in running EM" if EM.reactor_running? result = nil EM.run do self.new(params) do |res| begin result = res ensure EM.stop end end end result end |