Created
August 7, 2010 04:02
-
-
Save chewbranca/512410 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# require 'resque/tasks' | |
# will give you the resque tasks | |
namespace :resque do | |
task :setup | |
desc "Start Resque Scheduler" | |
task :scheduler => :scheduler_setup do |t,args| | |
require 'resque' | |
require 'resque_scheduler' | |
Resque::Scheduler.verbose = true if ENV['VERBOSE'] | |
Resque::Scheduler.run | |
end | |
task :scheduler_setup do | |
if ENV['INITIALIZER_PATH'] | |
load ENV['INITIALIZER_PATH'].to_s.strip | |
else | |
Rake::Task['resque:setup'].invoke | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment