mirror of
https://github.com/moebooru/moebooru
synced 2025-08-31 05:55:11 +00:00
Multithreaded memcached connection pool.
This commit is contained in:
1
Gemfile
1
Gemfile
@@ -25,6 +25,7 @@ gem "protected_attributes"
|
|||||||
gem "diff-lcs"
|
gem "diff-lcs"
|
||||||
gem "json"
|
gem "json"
|
||||||
gem "dalli"
|
gem "dalli"
|
||||||
|
gem "connection_pool"
|
||||||
gem "acts_as_versioned_rails3"
|
gem "acts_as_versioned_rails3"
|
||||||
gem "geoip"
|
gem "geoip"
|
||||||
gem "exception_notification"
|
gem "exception_notification"
|
||||||
|
@@ -49,6 +49,7 @@ GEM
|
|||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.8.0)
|
coffee-script-source (1.8.0)
|
||||||
|
connection_pool (2.0.0)
|
||||||
daemons (1.1.9)
|
daemons (1.1.9)
|
||||||
dalli (2.7.2)
|
dalli (2.7.2)
|
||||||
diff-lcs (1.2.5)
|
diff-lcs (1.2.5)
|
||||||
@@ -179,6 +180,7 @@ DEPENDENCIES
|
|||||||
cache_digests
|
cache_digests
|
||||||
coffee-rails (~> 4.0.0)
|
coffee-rails (~> 4.0.0)
|
||||||
coffee-rails-source-maps
|
coffee-rails-source-maps
|
||||||
|
connection_pool
|
||||||
daemons
|
daemons
|
||||||
dalli
|
dalli
|
||||||
diff-lcs
|
diff-lcs
|
||||||
|
@@ -88,6 +88,13 @@ using these commands:
|
|||||||
* Run `bundle exec rake db:migrate`
|
* Run `bundle exec rake db:migrate`
|
||||||
* Start the server (`bundle exec unicorn` or `bundle exec puma` if using JRuby/Rubinius)
|
* Start the server (`bundle exec unicorn` or `bundle exec puma` if using JRuby/Rubinius)
|
||||||
|
|
||||||
|
Configuration
|
||||||
|
-------------
|
||||||
|
|
||||||
|
See `config/local_config.rb.example`. Additionally, as I move to ENV-based configuration, here's the list of currently supported ENV variables:
|
||||||
|
|
||||||
|
- `MB_THREADS`: sets number of threads this application is running. Currently used to determine number of connection pool for `memcached`. Defaults to 1 if unset.
|
||||||
|
|
||||||
Plans
|
Plans
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
@@ -16,3 +16,5 @@ CONFIG["bundler_groups"] ||= [:default, Rails.env]
|
|||||||
CONFIG["bundler_groups"] << "standalone" if CONFIG["standalone"]
|
CONFIG["bundler_groups"] << "standalone" if CONFIG["standalone"]
|
||||||
|
|
||||||
CONFIG["bgcolor"] ||= "gray"
|
CONFIG["bgcolor"] ||= "gray"
|
||||||
|
|
||||||
|
CONFIG["threads"] ||= (ENV["MB_THREADS"] || 1).to_i
|
||||||
|
Reference in New Issue
Block a user