Skip to content
Snippets Groups Projects
Commit 494298ee authored by Richie Min's avatar Richie Min
Browse files

add resque scheduler

parent 3b37ff77
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -7,3 +7,5 @@ tmp/*
/.bundle
/db/*.sqlite3
/log/*.log
.powrc
.rvmrc
Loading
Loading
@@ -27,6 +27,7 @@ gem 'haml-rails'
 
# Jobs
gem 'resque'
gem 'resque-scheduler', :require => 'resque_scheduler'
 
# Format dates
gem 'stamp'
Loading
Loading
Loading
Loading
@@ -155,6 +155,10 @@ GEM
redis-namespace (~> 1.0)
sinatra (>= 0.9.2)
vegas (~> 0.1.2)
resque-scheduler (2.0.0)
redis (>= 2.0.1)
resque (>= 1.20.0)
rufus-scheduler
rspec (2.11.0)
rspec-core (~> 2.11.0)
rspec-expectations (~> 2.11.0)
Loading
Loading
@@ -169,6 +173,8 @@ GEM
railties (>= 3.0)
rspec (~> 2.11.0)
rubyzip (0.9.9)
rufus-scheduler (2.0.17)
tzinfo (>= 0.3.23)
sass (3.2.1)
sass-rails (3.2.5)
railties (~> 3.2.0)
Loading
Loading
@@ -243,6 +249,7 @@ DEPENDENCIES
rb-fsevent
rb-inotify
resque
resque-scheduler
rspec-rails
sass-rails (~> 3.2.3)
settingslogic
Loading
Loading
require 'resque/tasks'
require 'resque_scheduler/tasks'
namespace :resque do
task :setup do
require 'resque'
require 'resque_scheduler'
require 'resque/scheduler'
# you probably already have this somewhere
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
# Resque::Scheduler.set_schedule (and remove_schedule) methods.
# 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
# The schedule doesn't need to be stored in a YAML, it just needs to
# be a hash. YAML is usually the easiest.
#Resque.schedule = YAML.load_file('your_resque_schedule.yml')
# If your schedule already has +queue+ set for each job, you don't
# need to require your jobs. This can be an advantage since it's
# less code that resque-scheduler needs to know about. But in a small
# project, it's usually easier to just include you job classes here.
# So, something like this:
#require 'jobs'
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment