Skip to content

Commit

Permalink
fix queue name
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jun 16, 2020
1 parent 98d5d26 commit ba28ba3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/models/concerns/indexable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ def send_import_message(data)
# we use the AWS SQS client directly as there is no consumer in this app
def send_message(body, options={})
sqs = Aws::SQS::Client.new
queue_url = sqs.get_queue_url(queue_name: "#{Rails.env}_doi").queue_url
if Rails.env == "stage"
queue_name_prefix = ENV['ES_PREFIX'].present? ? "stage" : "test"
else
queue_name_prefix = Rails.env
end
queue_url = sqs.get_queue_url(queue_name: "#{queue_name_prefix}_doi").queue_url
options[:shoryuken_class] ||= "DoiImportWorker"

options = {
Expand Down

0 comments on commit ba28ba3

Please sign in to comment.