resque init, config, gemfile
This commit is contained in:
parent
db0106f13c
commit
8cb2a3a79a
5 changed files with 39 additions and 0 deletions
4
Gemfile
4
Gemfile
|
|
@ -52,6 +52,10 @@ gem 'rest-client'
|
||||||
#Backups
|
#Backups
|
||||||
gem "cloudfiles", :require => false
|
gem "cloudfiles", :require => false
|
||||||
|
|
||||||
|
#Queue
|
||||||
|
gem 'resque'
|
||||||
|
gem 'SystemTimer'
|
||||||
|
|
||||||
group :test, :development do
|
group :test, :development do
|
||||||
gem 'factory_girl_rails'
|
gem 'factory_girl_rails'
|
||||||
gem 'ruby-debug19' if RUBY_VERSION.include? "1.9"
|
gem 'ruby-debug19' if RUBY_VERSION.include? "1.9"
|
||||||
|
|
|
||||||
17
Gemfile.lock
17
Gemfile.lock
|
|
@ -77,6 +77,7 @@ PATH
|
||||||
GEM
|
GEM
|
||||||
remote: http://rubygems.org/
|
remote: http://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
|
SystemTimer (1.2.1)
|
||||||
abstract (1.0.0)
|
abstract (1.0.0)
|
||||||
actionmailer (3.0.1)
|
actionmailer (3.0.1)
|
||||||
actionpack (= 3.0.1)
|
actionpack (= 3.0.1)
|
||||||
|
|
@ -296,6 +297,14 @@ GEM
|
||||||
rake (>= 0.8.4)
|
rake (>= 0.8.4)
|
||||||
thor (~> 0.14.0)
|
thor (~> 0.14.0)
|
||||||
rake (0.8.7)
|
rake (0.8.7)
|
||||||
|
redis (2.1.1)
|
||||||
|
redis-namespace (0.8.0)
|
||||||
|
redis (< 3.0.0)
|
||||||
|
resque (1.10.0)
|
||||||
|
json (~> 1.4.6)
|
||||||
|
redis-namespace (~> 0.8.0)
|
||||||
|
sinatra (>= 0.9.2)
|
||||||
|
vegas (~> 0.1.2)
|
||||||
rest-client (1.6.1)
|
rest-client (1.6.1)
|
||||||
mime-types (>= 1.16)
|
mime-types (>= 1.16)
|
||||||
rspec (2.2.0)
|
rspec (2.2.0)
|
||||||
|
|
@ -330,6 +339,9 @@ GEM
|
||||||
ffi (~> 0.6.3)
|
ffi (~> 0.6.3)
|
||||||
json_pure
|
json_pure
|
||||||
rubyzip
|
rubyzip
|
||||||
|
sinatra (1.1.0)
|
||||||
|
rack (~> 1.1)
|
||||||
|
tilt (~> 1.1)
|
||||||
subexec (0.0.4)
|
subexec (0.0.4)
|
||||||
systemu (1.2.0)
|
systemu (1.2.0)
|
||||||
term-ansicolor (1.0.5)
|
term-ansicolor (1.0.5)
|
||||||
|
|
@ -338,6 +350,7 @@ GEM
|
||||||
eventmachine (>= 0.12.6)
|
eventmachine (>= 0.12.6)
|
||||||
rack (>= 1.0.0)
|
rack (>= 1.0.0)
|
||||||
thor (0.14.6)
|
thor (0.14.6)
|
||||||
|
tilt (1.1)
|
||||||
treetop (1.4.9)
|
treetop (1.4.9)
|
||||||
polyglot (>= 0.3.1)
|
polyglot (>= 0.3.1)
|
||||||
twitter (0.9.12)
|
twitter (0.9.12)
|
||||||
|
|
@ -347,6 +360,8 @@ GEM
|
||||||
oauth (~> 0.4.3)
|
oauth (~> 0.4.3)
|
||||||
tzinfo (0.3.23)
|
tzinfo (0.3.23)
|
||||||
uuidtools (2.1.1)
|
uuidtools (2.1.1)
|
||||||
|
vegas (0.1.8)
|
||||||
|
rack (>= 1.0.0)
|
||||||
warden (0.10.7)
|
warden (0.10.7)
|
||||||
rack (>= 1.0.0)
|
rack (>= 1.0.0)
|
||||||
webmock (1.6.1)
|
webmock (1.6.1)
|
||||||
|
|
@ -360,6 +375,7 @@ PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
|
SystemTimer
|
||||||
addressable
|
addressable
|
||||||
aws
|
aws
|
||||||
bson (= 1.1)
|
bson (= 1.1)
|
||||||
|
|
@ -393,6 +409,7 @@ DEPENDENCIES
|
||||||
omniauth
|
omniauth
|
||||||
pubsubhubbub
|
pubsubhubbub
|
||||||
rails (= 3.0.1)
|
rails (= 3.0.1)
|
||||||
|
resque
|
||||||
rest-client
|
rest-client
|
||||||
roxml!
|
roxml!
|
||||||
rspec (>= 2.0.0)
|
rspec (>= 2.0.0)
|
||||||
|
|
|
||||||
5
config/initializers/resque.rb
Normal file
5
config/initializers/resque.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
Dir[File.join(Rails.root, 'app', 'jobs', '*.rb')].each { |file| require file }
|
||||||
|
|
||||||
|
config = YAML::load(File.open("#{Rails.root}/config/redis.yml"))
|
||||||
|
Resque.redis = Redis.new(:host => config['host'], :port => config['port'])
|
||||||
|
|
||||||
10
config/redis.yml
Normal file
10
config/redis.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
default:
|
||||||
|
host: localhost
|
||||||
|
port: 6379
|
||||||
|
|
||||||
|
development:
|
||||||
|
test:
|
||||||
|
staging:
|
||||||
|
production:
|
||||||
|
|
||||||
3
lib/tasks/resque.rake
Normal file
3
lib/tasks/resque.rake
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
require 'resque/tasks'
|
||||||
|
task "resque:setup" => :environment
|
||||||
|
|
||||||
Loading…
Reference in a new issue