Commit be85e10a authored by DJ Mountney's avatar DJ Mountney

Add the rails runner command as a known runtime

Otherwise users get runtime identification errors when
omnibus-gitlab adds instance level apps for auth, like
grafana and mattermost.
parent 90fd52b0
...@@ -12,6 +12,7 @@ module Gitlab ...@@ -12,6 +12,7 @@ module Gitlab
:console, :console,
:geo_log_cursor, :geo_log_cursor,
:puma, :puma,
:rails_runner,
:rake, :rake,
:sidekiq, :sidekiq,
:test_suite, :test_suite,
...@@ -64,6 +65,10 @@ module Gitlab ...@@ -64,6 +65,10 @@ module Gitlab
!!defined?(::GeoLogCursorOptionParser) !!defined?(::GeoLogCursorOptionParser)
end end
def rails_runner?
!!defined?(::Rails::Command::RunnerCommand)
end
def web_server? def web_server?
puma? || unicorn? puma? || unicorn?
end end
......
...@@ -97,4 +97,12 @@ describe Gitlab::Runtime do ...@@ -97,4 +97,12 @@ describe Gitlab::Runtime do
it_behaves_like "valid runtime", :geo_log_cursor, 1 it_behaves_like "valid runtime", :geo_log_cursor, 1
end end
context "rails runner" do
before do
stub_const('::Rails::Command::RunnerCommand', double('::Rails::Command::RunnerCommand'))
end
it_behaves_like "valid runtime", :rails_runner, 1
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment