summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authorRichie Min <minruiqi@gmail.com>2012-12-26 16:15:20 +0800
committerRichie Min <minruiqi@gmail.com>2012-12-26 16:15:20 +0800
commit2324b3d17cef587ce5d7c41db4a5b2f1f3c8744e (patch)
tree03d79d93fa499eb96518c7692d4e42de4e1cf8c3 /lib/tasks
parent494298ee4a367616deacb95817289effa6c399c1 (diff)
downloadgitlab-ci-2324b3d17cef587ce5d7c41db4a5b2f1f3c8744e.tar.gz
add scheduler support
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/resque.rake9
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.