Skip to content

Instantly share code, notes, and snippets.

@rxbynerd
Created June 6, 2011 19:54
Show Gist options
  • Save rxbynerd/1010954 to your computer and use it in GitHub Desktop.
Save rxbynerd/1010954 to your computer and use it in GitHub Desktop.
require 'simple_worker'
class EncodePhoto < SimpleWorker::Base
merge_gem 'zencoder'
attr_accessor :photo_id, :unencoded_url
# The run method is what SimpleWorker calls to run your worker
def run
begin
photo = Photo.find(photo_id)
log 'foobar111444'
log photo.inspect
#puts 'foo11111'
#puts song.id
rescue
puts "Error #{$!}"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment