Skip to content

Instantly share code, notes, and snippets.

@skateman
Created April 19, 2016 08:03
Show Gist options
  • Save skateman/ca29398163ccb477eeaa45292624be6c to your computer and use it in GitHub Desktop.
Save skateman/ca29398163ccb477eeaa45292624be6c to your computer and use it in GitHub Desktop.
Snippet to start a MiqWorker separately
MiqWebsocketWorker.delete_all
require_relative 'config/environment'
class MiqWebsocketWorker::Runner
def heartbeat
end
end
row = MiqWebsocketWorker.create_worker_record
guid = row.guid
runner = MiqWebsocketWorker::Runner.start_worker(:guid => guid)
@skateman
Copy link
Author

Alternate port:

row = MiqWebsocketWorker.create_worker_record(:uri => 'http://localhost:3001')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment