gitlabhq/lib/tasks/resque.rake

12 lines
297 B
Ruby
Raw Permalink Normal View History

2011-12-12 23:03:38 +01:00
require 'resque/tasks'
2012-10-09 00:19:07 +04:00
task "resque:setup" => :environment do
2012-12-11 18:46:58 +02:00
Resque.after_fork do
Resque.redis.client.reconnect
2012-10-09 00:19:07 +04:00
end
2012-12-26 19:56:56 +02:00
Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection }
2012-10-09 00:19:07 +04:00
end
desc "Alias for resque:work (To run workers on Heroku)"
task "jobs:work" => "resque:work"