Skip to content

Commit

Permalink
Merge pull request #20321 from agrare/move_systemd_env_var_check
Browse files Browse the repository at this point in the history
Move the systemd env var check into the systemd_worker? method
  • Loading branch information
jrafanie authored Jul 2, 2020
2 parents 1d55261 + e1bbb20 commit 3a7421c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/miq_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -316,15 +316,15 @@ def containerized_worker?
end

def self.systemd_worker?
MiqEnvironment::Command.supports_systemd? && supports_systemd?
ENV['MIQ_SYSTEMD_WORKERS'] && MiqEnvironment::Command.supports_systemd? && supports_systemd?
end

def systemd_worker?
self.class.systemd_worker?
end

def start_runner
if ENV['MIQ_SYSTEMD_WORKERS'] && systemd_worker?
if systemd_worker?
start_systemd_worker
elsif containerized_worker?
start_runner_via_container
Expand Down

0 comments on commit 3a7421c

Please sign in to comment.