- Remove the worker class name from class_names.rb
- Start your sever normally
- Make sure your provider is added to your appliance (for provider-specific workers like refreshers and event catchers)
- Run rails console (see rails script below)
Last active
September 3, 2017 14:51
-
-
Save blomquisg/bde2af08605f128d5538 to your computer and use it in GitHub Desktop.
Debugging a MIQ Worker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Anybody know of a way to debug workers that currently works?
@NickLaMuro @jrafanie @carbonin ?
Oh this script works now, yay! 🎉
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Removal of worker class name from class_names.rb is supposed to prevent the worker from being started, right?
I can't get this expected behavior. I removed the 2 lines of the same worker. I also added a log line to the worker I'm removing. What I had expected was that the log line I added will be gone from evm.log. However, it is still there in evm.log. My 3 lines code change is here
What I would like to do is to start the subject worker in rails console in order to debug it. Thanks for your help.