Method: Bumbleworks::Worker::Info#send_command

Defined in:
lib/bumbleworks/worker/info.rb

#send_command(command, options = {}) ⇒ Object



162
163
164
165
166
167
168
169
170
# File 'lib/bumbleworks/worker/info.rb', line 162

def send_command(command, options = {})
  save_control_message(command)
  Bumbleworks::Worker.with_worker_state_enabled do
    Bumbleworks::Support.wait_until(options) do
      raw_hash["state"] == command
    end
  end
  reload
end