Class: Gizzard::MarkunbusyCommand

Inherits:
Command
  • Object
show all
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

#runObject



358
359
360
361
362
363
364
365
366
# File 'lib/gizzard/commands.rb', line 358

def run
  shard_ids = @argv
  shard_ids.each do |shard_id|
    id = ShardId.parse(shard_id)
    manager.mark_shard_busy(id, 0)
    shard_info = manager.get_shard(id)
    output shard_info.to_unix
  end
end