diff options
author | Richie Min <minruiqi@gmail.com> | 2012-12-26 16:15:20 +0800 |
---|---|---|
committer | Richie Min <minruiqi@gmail.com> | 2012-12-26 16:15:20 +0800 |
commit | 2324b3d17cef587ce5d7c41db4a5b2f1f3c8744e (patch) | |
tree | 03d79d93fa499eb96518c7692d4e42de4e1cf8c3 /lib/tasks | |
parent | 494298ee4a367616deacb95817289effa6c399c1 (diff) | |
download | gitlab-ci-2324b3d17cef587ce5d7c41db4a5b2f1f3c8744e.tar.gz |
add scheduler support
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/resque.rake | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/tasks/resque.rake b/lib/tasks/resque.rake index 42a931c..8963b08 100644 --- a/lib/tasks/resque.rake +++ b/lib/tasks/resque.rake @@ -2,13 +2,14 @@ require 'resque/tasks' require 'resque_scheduler/tasks' namespace :resque do - task :setup do + task :setup => :environment do require 'resque' require 'resque_scheduler' - require 'resque/scheduler' + #require 'resque_scheduler/server' + #require 'resque/scheduler' # you probably already have this somewhere - Resque.redis = 'localhost:6379' + #Resque.redis = 'localhost:6379' # If you want to be able to dynamically change the schedule, # uncomment this line. A dynamic schedule can be updated via the @@ -16,7 +17,7 @@ namespace :resque do # When dynamic is set to true, the scheduler process looks for # schedule changes and applies them on the fly. # Note: This feature is only available in >=2.0.0. - #Resque::Scheduler.dynamic = true + Resque::Scheduler.dynamic = true # The schedule doesn't need to be stored in a YAML, it just needs to # be a hash. YAML is usually the easiest. |