Skip to content

Commit

Permalink
Ensure that options[:ems_id] is an Array when passed as an ENV var
Browse files Browse the repository at this point in the history
When passing the EMS_ID as an ENV var we need to ensure that it is an
array to be consistent with how OptionParser is processing it
  • Loading branch information
agrare committed Nov 12, 2020
1 parent ace7b47 commit 5b609bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/workers/bin/run_single_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def all_role_names
# Skip heartbeating with single worker
ENV["DISABLE_MIQ_WORKER_HEARTBEAT"] ||= options[:heartbeat] ? nil : '1'

options[:ems_id] ||= ENV["EMS_ID"]
options[:ems_id] ||= ENV["EMS_ID"].try(:split, ',')

if options[:roles].present?
MiqServer.my_server.server_role_names += options[:roles]
Expand Down

0 comments on commit 5b609bb

Please sign in to comment.