Commit b55a5eab authored by Stan Hu's avatar Stan Hu

Merge branch 'rails-runner-runtime' into 'master'

Add the rails runner command as a known runtime

Closes #205702

See merge request gitlab-org/gitlab!25291
parents 7477d032 be85e10a
...@@ -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