Exception: ActiveJob::QueueAdapters::ActiveElasticJobAdapter::NonExistentQueue

Inherits:
Error
  • Object
show all
Defined in:
lib/active_job/queue_adapters/active_elastic_job_adapter.rb

Overview

Raised when job queue does not exist. The job queue is determined by ActiveJob::Base.queue_as. You can either: (1) create a new Amazon SQS queue and attach a worker environment to it, or (2) select a different queue for your jobs.

Example:

  • Open your AWS console and create an SQS queue named high_priority in the same AWS region of your Elastic Beanstalk environments.

  • Queue your jobs accordingly:

class MyJob < ActiveJob::Base
  queue_as :high_priority
  #..
end

Instance Method Summary collapse

Constructor Details

#initialize(queue_name) ⇒ NonExistentQueue

Returns a new instance of NonExistentQueue.



59
60
61
62
63
64
65
66
67
68
# File 'lib/active_job/queue_adapters/active_elastic_job_adapter.rb', line 59

def initialize(queue_name)

  super(<<-MSG)
    The job is bound to queue at #{queue_name}.
    Unfortunately a queue with this name does not exist in this
    region. Either create an Amazon SQS queue named #{queue_name} -
    you can do this in AWS console, make sure to select region
    '#{ENV['AWS_REGION']}' - or you select another queue for your jobs.
  MSG
end