Skip to content

Instantly share code, notes, and snippets.

@chsh
Created June 15, 2015 04:14
Show Gist options
  • Save chsh/f2f8d85626dc2bd06dbf to your computer and use it in GitHub Desktop.
Save chsh/f2f8d85626dc2bd06dbf to your computer and use it in GitHub Desktop.
Accept SQS message for Rails controller.
class QueueHandlerController < ApplicationController
skip_before_action :verify_authenticity_token
before_action :verify_worker_tier
def receive
ActiveJob::Base.execute params
render text: ''
end
private
def verify_worker_tier
# describe code to verify tier type = worker.
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment