Fix rails env call

This commit is contained in:
Eugene Burmakin
2025-06-05 00:55:45 +02:00
parent 24eaef1ae4
commit b86aa06bbb

View File

@@ -44,7 +44,13 @@ preload_app!
plugin :tmp_restart
# If env var is set or we're in development, solid_queue will run in puma
plugin :solid_queue if ENV['SOLID_QUEUE_IN_PUMA'] || Rails.env.development?
if ENV['SOLID_QUEUE_IN_PUMA'] || ENV.fetch('RAILS_ENV', 'development') == 'development'
begin
plugin :solid_queue
rescue => e
puts "Failed to load solid_queue plugin: #{e.message}"
end
end
# Prometheus exporter
if ENV['PROMETHEUS_EXPORTER_ENABLED'].to_s == 'true'