Skip to content

Commit

Permalink
Check for update_driven_refresh setting existance
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Jul 26, 2017
1 parent 153cf09 commit 94d85ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions app/models/miq_vim_broker_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ class MiqVimBrokerWorker < MiqWorker
require_nested :Runner

self.required_roles = lambda {
roles = %w(
%w(
ems_metrics_collector
ems_operations
smartproxy
smartstate
)

roles << 'ems_inventory' unless Settings.prototype.ems_vmware.update_driven_refresh

roles
).tap do |roles|
roles << 'ems_inventory' unless Settings.prototype.try(:ems_vmware).try(:update_driven_refresh)
end
}

self.check_for_minimal_role = false
Expand Down
2 changes: 1 addition & 1 deletion app/models/miq_vim_broker_worker/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def reset_broker_update_sleep_interval
end

def has_ems_inventory_role?
@active_roles.include?("ems_inventory") && !Settings.prototype.ems_vmware.update_driven_refresh
@active_roles.include?("ems_inventory") && !Settings.prototype.try(:ems_vmware).try(:update_driven_refresh)
end

def reset_broker_update_notification
Expand Down

0 comments on commit 94d85ed

Please sign in to comment.