diff --git a/app/models/concerns/indexable.rb b/app/models/concerns/indexable.rb index d50544adc..077da47c2 100644 --- a/app/models/concerns/indexable.rb +++ b/app/models/concerns/indexable.rb @@ -296,7 +296,6 @@ def query(query, options={}) filter << { terms: { client_ids: options[:client_id].to_s.split(",") }} if options[:client_id].present? filter << { terms: { state: options[:state].to_s.split(",") }} if options[:state].present? elsif self.name == "ProviderPrefix" - Rails.logger.warn query.inspect if query.present? must = [{ prefix: { prefix_id: query }}] else diff --git a/config/application.rb b/config/application.rb index adddfa59f..a4280217b 100644 --- a/config/application.rb +++ b/config/application.rb @@ -155,7 +155,13 @@ class Application < Rails::Application else config.active_job.queue_adapter = :inline end - config.active_job.queue_name_prefix = Rails.env + + # use SQS based on environment, use "test" prefix for test system + if Rails.env == "stage" + config.active_job.queue_name_prefix = ENV['ES_PREFIX'].present? ? "stage" : "test" + else + config.active_job.queue_name_prefix = Rails.env + end config.generators do |g| g.fixture_replacement :factory_bot