-
Notifications
You must be signed in to change notification settings - Fork 897
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
Ansible Tower Event Catcher #13423
Ansible Tower Event Catcher #13423
Conversation
@miq-bot add_labels enhancement, providers/ansible_tower, euwe/no |
Oh, and this requires ansible/ansible_tower_client_ruby#54 to be merged and released |
def initialize(ems) | ||
@ems = ems | ||
@last_activity = nil | ||
@stop_polling = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the negative name? why not @polling
or @polling_enabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because I want to make this read positive
throw :stop_polling if @stop_polling
vs
throw :stop_polling unless @polling_enabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'm with @chessbyte on this one ... The truthy name and boolean value seems to make more sense. Even with throw :stop_polling unless @polling_enabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, convinced 😄 Thanks for your input.
catch(:stop_polling) do | ||
begin | ||
loop do | ||
ap filter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does the ap
method do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, it's a debugging leftover
847a910
to
5653176
Compare
5653176
to
9e8622c
Compare
@blomquisg pls re-review also have a look at those event names and where I put them |
Checked commits durandom/manageiq@e938b1d~...9e8622c with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1 app/models/manageiq/providers/ansible_tower/configuration_manager/event_catcher.rb
app/models/manageiq/providers/ansible_tower/configuration_manager/event_catcher/runner.rb
|
First version of event catcher for ansible tower provider
still open and for a follow up PR:
@blomquisg @jameswnl @juliancheal please review