Skip to content

Instantly share code, notes, and snippets.

@pdcawley
Created April 6, 2009 14:29
Show Gist options
  • Save pdcawley/90772 to your computer and use it in GitHub Desktop.
Save pdcawley/90772 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot.rb'
require File.dirname(__FILE__) + '/../config/environment.rb'
require 'mq'
AMQP.start(:host => 'localhost',
:insist => true,
:logging => true) do
queue = MQ.queue("/#{RAILS_ENV}_uploads", :durable => true)
queue.subscribe do |msg|
tune_id = msg
Tune.find(msg).transcode!
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment