Skip to content

Instantly share code, notes, and snippets.

@carimura
Last active December 13, 2015 17:49
Show Gist options
  • Save carimura/4950905 to your computer and use it in GitHub Desktop.
Save carimura/4950905 to your computer and use it in GitHub Desktop.
require 'sinatra'
require 'iron_mq'
def get_client
# Set these to your IronMQ credentials
config = {
token: '',
project_id: ''
}
@ironmq = IronMQ::Client.new(token: config[:token], project_id: config[:project_id])
end
get '/' do
ironmq = get_client
@queue = ironmq.queue("open_shift_queue")
@msg = @queue.post("hello queue!")
@msg = @queue.get
erb :index
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment