Skip to content

Commit

Permalink
Fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
tschafer-gc committed Nov 8, 2024
1 parent a4b5040 commit 529392f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
14 changes: 13 additions & 1 deletion bin/que
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ require "prometheus_gcstat"
require "puma"
require "que"
require "rack"
USE_RACKUP = Rack.release.split(".")[0].to_i >= 3
if USE_RACKUP
require "rackup"
end
require "rack/handler/puma"

$stdout.sync = true

Expand Down Expand Up @@ -172,7 +177,14 @@ if options.metrics_port

host = "0.0.0.0"

Rack::Handler::Puma.run(
handler =
if USE_RACKUP
Rackup::Handler::Puma
else
Rack::Handler::Puma
end

handler.run(
app,
Host: host,
Port: options.metrics_port,
Expand Down
1 change: 1 addition & 0 deletions que.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Gem::Specification.new do |spec|

spec.add_dependency "puma"
spec.add_dependency "rack", ">= 2", "< 4"
spec.add_dependency "rackup"

spec.add_runtime_dependency "activesupport"
spec.metadata["rubygems_mfa_required"] = "true"
Expand Down

0 comments on commit 529392f

Please sign in to comment.