class Aws::Rails::Middleware::ElasticBeanstalkSQSD

def execute_job(request)

def execute_job(request)
  # Jobs queued from the Active Job SQS adapter contain the JSON message in the request body.
  job = Aws::Json.load(request.body.string)
  job_name = job['job_class']
  @logger.debug("Executing job: #{job_name}")
  begin
    ::ActiveJob::Base.execute(job)
  rescue NameError => e
    @logger.error("Job #{job_name} could not resolve to a class that inherits from Active Job.")
    @logger.error("Error: #{e}")
    return internal_error_response
  end
  [200, { 'Content-Type' => 'text/plain' }, ["Successfully ran job #{job_name}."]]
end