Class: SolidQueueGuard::Checks::Config::EnvFlagsCheck
- Defined in:
- lib/solid_queue_guard/checks/config/env_flags_check.rb
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from SolidQueueGuard::Checks::Base
Instance Method Details
#call ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/solid_queue_guard/checks/config/env_flags_check.rb', line 7 def call if Rails.env.production? && ActiveModel::Type::Boolean.new.cast(ENV.fetch('SOLID_QUEUE_SKIP_RECURRING', nil)) warn( 'env_flags', 'SOLID_QUEUE_SKIP_RECURRING=true in production', suggestion: 'Remove SOLID_QUEUE_SKIP_RECURRING unless recurring jobs are intentionally disabled' ) else pass('env_flags', 'No dangerous Solid Queue environment flags detected') end end |