class Cassandra::Utils::CLI::Base

Attributes

command[R]
stdout[R]

Public Instance Methods

cwd() click to toggle source
# File lib/cassandra/utils/cli/base.rb, line 9
def cwd
  '/tmp'
end
output() click to toggle source
# File lib/cassandra/utils/cli/base.rb, line 21
def output
  raise NotImplementedError, 'Must implement this in a subclass'
end
run!() click to toggle source
# File lib/cassandra/utils/cli/base.rb, line 25
def run!
  runner
  @command.run!
  @stdout = @command.stdout
  out = output
  Utils::Statsd.new(metric_name).to_dd(out).push!
  out
end
runner() click to toggle source
# File lib/cassandra/utils/cli/base.rb, line 17
def runner
  @command ||= DaemonRunner::ShellOut.new(command: command, cwd: cwd, timeout: timeout)
end
timeout() click to toggle source
# File lib/cassandra/utils/cli/base.rb, line 13
def timeout
  300
end