Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move embedded ansible worker thread up to start_runner #14256

Merged
Prev Previous commit
Next Next commit
Put the do_before_work_loop before the do_work_loop.
  • Loading branch information
jrafanie committed Mar 9, 2017
commit 9538cbd2d66739b884d3fdb4b044ab63e78a29f4
16 changes: 8 additions & 8 deletions app/models/embedded_ansible_worker/runner.rb
Original file line number Diff line number Diff line change
@@ -9,6 +9,14 @@ def prepare
self
end

def do_before_work_loop
setup_ansible
update_embedded_ansible_provider
rescue => err
_log.log_backtrace(err)
do_exit
end

def do_work_loop
_log.info("entering ansible monitor loop")
loop do
@@ -20,14 +28,6 @@ def do_work_loop
do_exit
end

def do_before_work_loop
setup_ansible
update_embedded_ansible_provider
rescue => err
_log.log_backtrace(err)
do_exit
end

def setup_ansible
_log.info("calling EmbeddedAnsible.configure")
EmbeddedAnsible.configure unless EmbeddedAnsible.configured?