Sha256: 7cb6cb879eb1b6559198224649c504079170e566a5213fb261236fbb053a1997

Contents?: true

Size: 1.04 KB

Versions: 4

Compression:

Stored size: 1.04 KB

Contents

module DRbQS
  class Command
    class Node < DRbQS::Command::Base
      HELP_MESSAGE =<<HELP
Usage: #{@@command_name} <uri> [options ...]
  Start DRbQS nodes connecting to <uri>.

HELP

      def initialize
        super(DRbQS::Setting::Node, HELP_MESSAGE)
      end

      def parse_option(argv)
        argv = option_parser_base(argv, :log_level => true, :daemon => true, :debug => true) do
          set(:load, '-l', '--load FILE', String, 'Add a file to load.')
          set(:process, '-P', '--process NUM', Integer, 'Set the number of node processes to execute.')
          set(:group, '--group STR', String, 'Set the group of node.')
          set(:loadavg, '--loadavg STR', String, 'Set the threshold load average to sleep.')
          set(:log_prefix, '--log-prefix STR', String, "Set the prefix of log files. The default is '#{setting.default[:log_prefix][0]}'.")
          set(:log_stdout, '--log-stdout', 'Use stdout for outputting logs. This option cancels --log-prefix.')
        end
        setting.set_argument(*argv)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
drbqs-0.1.1 lib/drbqs/command_line/command_node.rb
drbqs-0.1.0 lib/drbqs/command_line/command_node.rb
drbqs-0.0.19 lib/drbqs/command_line/command_node.rb
drbqs-0.0.18 lib/drbqs/command_line/command_node.rb