mirror of
https://github.com/zhigang1992/tsemple.git
synced 2026-04-29 13:15:25 +08:00
Add redis and redis config
This commit is contained in:
4
Gemfile
4
Gemfile
@@ -74,6 +74,10 @@ gem 'http_accept_language', '~> 2.0.1'
|
||||
# i18n
|
||||
gem 'rails-i18n', '~> 4.0.1'
|
||||
|
||||
# redis
|
||||
gem 'redis', '~> 3.0.7'
|
||||
gem 'hiredis', '~> 0.4.5'
|
||||
|
||||
# Background jobs
|
||||
gem 'resque', '~> 1.25.1'
|
||||
|
||||
|
||||
@@ -148,6 +148,7 @@ GEM
|
||||
hashie (2.0.5)
|
||||
highline (1.6.20)
|
||||
hike (1.2.3)
|
||||
hiredis (0.4.5)
|
||||
http_accept_language (2.0.1)
|
||||
http_parser.rb (0.5.3)
|
||||
i18n (0.6.9)
|
||||
@@ -276,6 +277,7 @@ DEPENDENCIES
|
||||
font-awesome-sass (~> 4.0.2)
|
||||
gravtastic (~> 3.2.6)
|
||||
guard-livereload
|
||||
hiredis (~> 0.4.5)
|
||||
http_accept_language (~> 2.0.1)
|
||||
i18n-tasks (~> 0.3.2)
|
||||
jbuilder (~> 1.2)
|
||||
@@ -289,6 +291,7 @@ DEPENDENCIES
|
||||
rails!
|
||||
rails-i18n (~> 4.0.1)
|
||||
redcarpet (~> 3.0.0)
|
||||
redis (~> 3.0.7)
|
||||
resque (~> 1.25.1)
|
||||
rouge (~> 1.3.1)
|
||||
sass-rails!
|
||||
|
||||
@@ -2,11 +2,16 @@ default: &default
|
||||
name: Campo
|
||||
host: localhost
|
||||
|
||||
admin_emails:
|
||||
# - admin@example.com
|
||||
|
||||
mailer:
|
||||
default_from: 'no-reply@example.com'
|
||||
|
||||
admin_emails:
|
||||
# - admin@example.com
|
||||
redis:
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
db: 0
|
||||
|
||||
development:
|
||||
<<: *default
|
||||
|
||||
6
config/initializers/resque.rb
Normal file
6
config/initializers/resque.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
$redis = Redis.new(host: CONFIG['redis']['host'],
|
||||
port: CONFIG['redis']['port'],
|
||||
db: CONFIG['redis']['db'],
|
||||
driver: :hiredis)
|
||||
|
||||
Resque.redis = $redis
|
||||
Reference in New Issue
Block a user