2011-03-09 13:13:36 +00:00
|
|
|
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
|
|
|
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
|
|
|
|
|
|
|
require File.expand_path('../config/application', __FILE__)
|
|
|
|
require 'rake'
|
2012-05-31 08:02:25 +01:00
|
|
|
require 'resque/tasks'
|
2014-02-10 19:36:10 +00:00
|
|
|
require 'resque_scheduler/tasks'
|
2012-05-31 08:02:25 +01:00
|
|
|
|
|
|
|
# This fixes connection fail with Postgres server on new fork:
|
|
|
|
task "resque:setup" => :environment do
|
|
|
|
Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection }
|
|
|
|
end
|
2011-03-09 13:13:36 +00:00
|
|
|
|
|
|
|
Rosa::Application.load_tasks
|