Class: Flydata::Helper::Action::Resync

Inherits:
AgentAction show all
Defined in:
lib/flydata/helper/action/resync.rb

Constant Summary

Constants inherited from AgentAction

AgentAction::FLYDATA_CMD

Instance Attribute Summary

Attributes inherited from BaseAction

#config

Instance Method Summary collapse

Methods inherited from AgentAction

#execute

Methods inherited from BaseAction

#config_hash, #initialize

Constructor Details

This class inherits a constructor from Flydata::Helper::BaseAction

Instance Method Details

#command(opts = {}) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/flydata/helper/action/resync.rb', line 7

def command(opts = {})
  tables = config_hash(opts)[:tables]
  arg = case tables
        when Array
          tables.join(' ')
        when String  # --all option
          tables
        else
          raise "Wrong tables parameter - tables:\"#{tables}\""
        end
  "sync:resync -y --force %s" % [arg]
end