Skip to content

Commit

Permalink
refactor how to consider multiple druid services
Browse files Browse the repository at this point in the history
  • Loading branch information
ljblancoredborder committed May 21, 2024
1 parent 213a98d commit 10e0343
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions resources/recipes/configure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,13 @@
action (manager_services['kafka'] ? [:add, :register] : [:remove, :deregister])
end

if manager_services['druid-coordinator'] or
manager_services['druid-overlord'] or
manager_services['druid-broker'] or
manager_services['druid-middlemanager'] or
manager_services['druid-historical'] or
manager_services['druid-realtime']

['druid-broker', 'druid-coordinator', 'druid-historical',
'druid-middlemanager', 'druid-overlord'].each do |druid_service|
druid_group = %w[coordinator overlord broker middlemanager historical realtime]
druid_group.map! { |subfix| "druid-#{subfix}" }

if druid_group.any? { |druid| manager_services[druid] }
druid_group.each do |druid_service|
next if druid_service == 'druid_realtime'

service druid_service do
supports :status => true, :start => true, :restart => true, :reload => true
action :nothing
Expand Down

0 comments on commit 10e0343

Please sign in to comment.