Skip to content

Instantly share code, notes, and snippets.

@azuby
Created August 28, 2012 02:13
Show Gist options
  • Save azuby/3494312 to your computer and use it in GitHub Desktop.
Save azuby/3494312 to your computer and use it in GitHub Desktop.
require "resque/tasks"
# Load entire rails environment for workers
task "resque:setup" => :environment do
Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection }
ENV['QUEUE'] = '*'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment