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, aws_region) ⇒ NonExistentQueue

Returns a new instance of NonExistentQueue.



52
53
54
55
56
57
58
59
60
61
62
# File 'lib/active_job/queue_adapters/active_elastic_job_adapter.rb', line 52

def initialize(queue_name, aws_region)

  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
    '#{aws_region}' - or you
    select another queue for your jobs.
  MSG
end