Class: Gizzard::CreateCommand
- Defined in:
- lib/gizzard/commands.rb
Instance Attribute Summary
Attributes inherited from Command
#argv, #buffer, #command_options, #global_options, #job_injector, #manager
Instance Method Summary collapse
Methods inherited from Command
classify, #confirm!, #get_base_name, #help!, #initialize, make_job_injector, make_manager, #output, #require_tables, #require_template_options, run
Constructor Details
This class inherits a constructor from Gizzard::Command
Instance Method Details
#run ⇒ Object
300 301 302 303 304 305 306 307 308 309 310 311 312 |
# File 'lib/gizzard/commands.rb', line 300 def run help! if argv.length < 2 class_name, *shard_ids = argv busy = 0 source_type = .source_type || "" destination_type = .destination_type || "" shard_ids.each do |id| shard_id = ShardId.parse(id) manager.create_shard(ShardInfo.new(shard_id, class_name, source_type, destination_type, busy)) manager.get_shard(shard_id) output shard_id.to_unix end end |