Sha256: e772ceb2ddc1b51f74755c898fc34615562fcdbcce08dfbd6c7f5c4639608d8a

Contents?: true

Size: 546 Bytes

Versions: 10

Compression:

Stored size: 546 Bytes

Contents

module Invoker
  module IPC
    class DnsCheckCommand < BaseCommand
      def run_command(message_object)
        process_detail = Invoker.dns_cache[message_object.process_name]

        dns_check_response = Invoker::IPC::Message::DnsCheckResponse.new(
          process_name: message_object.process_name,
          port: process_detail ? process_detail['port'] : nil,
          ip: process_detail && process_detail['ip'] ? process_detail['ip'] : '0.0.0.0'
        )
        send_data(dns_check_response)
        true
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
itrg-invoker-1.6.1 lib/invoker/ipc/dns_check_command.rb
itrg-invoker-1.6.0 lib/invoker/ipc/dns_check_command.rb
invoker-1.5.8 lib/invoker/ipc/dns_check_command.rb
invoker-1.5.7 lib/invoker/ipc/dns_check_command.rb
invoker-1.5.6 lib/invoker/ipc/dns_check_command.rb
invoker-1.5.5 lib/invoker/ipc/dns_check_command.rb
invoker-1.5.4 lib/invoker/ipc/dns_check_command.rb
invoker-1.5.3 lib/invoker/ipc/dns_check_command.rb
meepo-1.5.2 lib/invoker/ipc/dns_check_command.rb
invoker-1.5.1 lib/invoker/ipc/dns_check_command.rb