Skip to content

Instantly share code, notes, and snippets.

@blomquisg
Last active September 3, 2017 14:51
Show Gist options
  • Save blomquisg/bde2af08605f128d5538 to your computer and use it in GitHub Desktop.
Save blomquisg/bde2af08605f128d5538 to your computer and use it in GitHub Desktop.
Debugging a MIQ Worker
  1. Remove the worker class name from class_names.rb
  2. Start your sever normally
  3. Make sure your provider is added to your appliance (for provider-specific workers like refreshers and event catchers)
  4. Run rails console (see rails script below)
worker_class = ManageIQ::Providers::Openstack::CloudManager::EventCatcher
runner_class = worker_class::Runner
worker = worker_class.create_worker_record
runner_cfg = {:guid => worker.guid, :ems_id => "25"}
runner = runner_class.new(runner_cfg)
runner.start
@moolitayer
Copy link

Anybody know of a way to debug workers that currently works?
@NickLaMuro @jrafanie @carbonin ?

@moolitayer
Copy link

Oh this script works now, yay! 🎉

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