more redis and resque stuff
This commit is contained in:
@@ -38,4 +38,4 @@ Rails::Initializer.run do |config|
|
||||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
||||
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
|
||||
# config.i18n.default_locale = :de
|
||||
end
|
||||
end
|
||||
|
6
rails/map-mash/config/initializers/01-settings.rb
Normal file
6
rails/map-mash/config/initializers/01-settings.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
require 'mc-settings'
|
||||
|
||||
Setting.load(
|
||||
:path => Rails.root,
|
||||
:files => ['config/settings/default.yml']
|
||||
)
|
8
rails/map-mash/config/initializers/redis_conf.rb
Normal file
8
rails/map-mash/config/initializers/redis_conf.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
require 'erb'
|
||||
|
||||
File.open(Rails.root.join('config/redis.conf.erb'), 'r') do |f|
|
||||
tmpl = ERB.new(f.read)
|
||||
File.open(Rails.root.join('config/redis.conf'), 'w') do |conf|
|
||||
conf.write(tmpl.result(binding))
|
||||
end
|
||||
end
|
@@ -22,7 +22,7 @@ pidfile /tmp/rails-map-mash-redis/server.pid
|
||||
|
||||
# Accept connections on the specified port, default is 6379.
|
||||
# If port 0 is specified Redis will not listen on a TCP socket.
|
||||
port 16379
|
||||
port <%= Setting.redis(:port) %>
|
||||
|
||||
# If you want you can bind a single interface, if the bind option is not
|
||||
# specified all the interfaces will listen for incoming connections.
|
5
rails/map-mash/config/settings/default.yml
Normal file
5
rails/map-mash/config/settings/default.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
resque_web:
|
||||
port: 15678
|
||||
|
||||
redis:
|
||||
port: 16379
|
Reference in New Issue
Block a user