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

Overriding queue name to generate an array of queue names #280

Merged
merged 4 commits into from Aug 29, 2017
Merged

Overriding queue name to generate an array of queue names #280

merged 4 commits into from Aug 29, 2017

Conversation

juliancheal
Copy link
Member

this allows us to create an array of child managers for our queue.

this allows us to create an array of child managers for our queue.
@juliancheal
Copy link
Member Author

This PR relies on ManageIQ/manageiq#15711

@juliancheal juliancheal changed the title [WIP] Overriding queue name to generate an array of queue names Overriding queue name to generate an array of queue names Aug 4, 2017
@miq-bot miq-bot removed the wip label Aug 4, 2017
Overriding queue_name on ::CloudManager was causing more problems
than it solved. Moving this code to the Refeshwoker solves our
multiple queues for one worker, while not causing (too many) new issues.
# of the Amazon inventory across all managers.
def self.queue_name_for_ems(ems)
return ems unless ems.kind_of?(ExtManagementSystem)
["ems_#{ems.id}"] + ems.child_managers.collect { |manager| "ems_#{manager.id}" }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parent implementation handles strange edge cases like if the input is a Host.

Maybe this should be:

if ems.kind_of?(ExtManagementSystem)
  ["ems_#{ems.id}"] + ems.child_managers.collect { |manager| "ems_#{manager.id}" }
else
  super
end

Then, let super handle any of the edge cases.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah agreed. I think I was too happy to have found my last bug!

@miq-bot
Copy link
Member

miq-bot commented Aug 8, 2017

Checked commits https://github.com/juliancheal/manageiq-providers-amazon/compare/59f4b276c349f38281b90a360056d69b9fbf705c~...4f241f87cc779bfeef701be6f0e92319dfa49454 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
1 file checked, 0 offenses detected
Everything looks fine. 👍

@juliancheal
Copy link
Member Author

@durandom @blomquisg merge?

@durandom
Copy link
Member

Dont we need the dependent PR merged first?

@juliancheal
Copy link
Member Author

Dont we need the dependent PR merged first?

To be honest, I don't know which PR needs merging first :(

@agrare agrare merged commit 955c573 into ManageIQ:master Aug 29, 2017
@agrare agrare self-assigned this Aug 29, 2017
@bronaghs bronaghs added this to the Sprint 68 Ending Sep 4, 2017 milestone Sep 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants