Sha256: 0e3c56a78be3f76f8af43ee5f4b785a92fa27226344132e2f390ed08db1ddbde
Contents?: true
Size: 810 Bytes
Versions: 20
Compression:
Stored size: 810 Bytes
Contents
module Ring class SQA class Alarm class Exec def send opts stdout = JSON.pretty_generate( { :alarm_buffer => opts[:alarm_buffer].exceeding_nodes, :nodes => opts[:nodes].all, :short => opts[:short], :long => opts[:long], :status => opts[:status], :afi => opts[:afi], }) exec stdout, CFG.exec.command, CFG.exec.arguments? rescue => error Log.error "Exec raised '#{error.class}' with message '#{error.message}'" end private def exec write, cmd, args args = '' unless args args = args.split ' ' Open3.popen3(cmd, *args) do |stdin, stdout, stderr, wait_thr| stdin.write write stdin.close wait_thr.join end end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems