Skip to content

Commit

Permalink
Better explain the REDIS_DB and REDIS_DB_FOR_RESQUE config vars
Browse files Browse the repository at this point in the history
  • Loading branch information
philc committed Feb 28, 2013
1 parent 7bfd9c2 commit 6e1e0be
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions config/deploy_targets/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def self.common_options
db_password: "",
redis_host: "localhost",
redis_port: 6379,
redis_db: 0,
redis_db_for_resque: 1,
# This can be a comma-separated list of OPENID providers.
openid_providers: "https://www.google.com/accounts/o8/ud",
# This hostname is used when generating URLs to commits in emails.
Expand Down
6 changes: 4 additions & 2 deletions environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@

REDIS_HOST = "localhost"
REDIS_PORT = 6379
REDIS_DB = 0
RESQUE_DB = 1

# These Redis databases are used by Barkeep for caching and Resque jobs. Redis uses integers for DB names.
REDIS_DB = 0
REDIS_DB_FOR_RESQUE = 1

# A comma-separate list of OpenID provider URLs for signing in your users.
# If you provide more than one, users will receive a UI allowing to pick which service to use to authenticate.
Expand Down
3 changes: 1 addition & 2 deletions lib/script_environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
require "lib/redis_manager"
require "backtrace_shortener"

Resque.redis = Redis.new(:host => REDIS_HOST, :port => REDIS_PORT,
:db => RESQUE_DB)
Resque.redis = Redis.new(:host => REDIS_HOST, :port => REDIS_PORT, :db => REDIS_DB_FOR_RESQUE)

# Make the developer experience better by shortening backtraces.
BacktraceShortener.monkey_patch_the_exception_class! unless ENV["RACK_ENV"] == "production"
Expand Down

0 comments on commit 6e1e0be

Please sign in to comment.