Class: Serverkit::Actions::Check
- Defined in:
- lib/serverkit/actions/check.rb
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Serverkit::Actions::Base
Instance Method Details
#run ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/serverkit/actions/check.rb', line 7 def run successful = backends.map do |backend| Thread.new do recipe.resources.map(&:clone).map do |resource| resource.backend = backend resource.run_check puts resource.inspect_check_result resource end end end.map(&:value).flatten.all?(&:successful?) if successful exit else exit(1) end end |