-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into profile-add-column-sql
- Loading branch information
Showing
8 changed files
with
114 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/** | ||
* Copyright (c) 2017, salesforce.com, inc. | ||
* All rights reserved. | ||
* Licensed under the BSD 3-Clause license. | ||
* For full license text, see LICENSE.txt file in the repo root or | ||
* https://opensource.org/licenses/BSD-3-Clause | ||
*/ | ||
|
||
/** | ||
* ./config/redisConfig.js | ||
* | ||
* Assigns each of the different redis uses cases to a particular redis | ||
* instance, if configured, or falls back to the primary redis instance. | ||
*/ | ||
'use strict'; // eslint-disable-line strict | ||
const pe = process.env; // eslint-disable-line no-process-env | ||
const DEFAULT_LOCAL_REDIS_URL = '//127.0.0.1:6379'; | ||
const PRIMARY_REDIS = (pe.REDIS_URL || DEFAULT_LOCAL_REDIS_URL); | ||
const channelName = 'focus'; | ||
|
||
module.exports = { | ||
channelName, | ||
instanceUrl: { | ||
/* | ||
* Cache perspectives, lenses, etc. | ||
*/ | ||
cache: pe.REDIS_CACHE && pe[pe.REDIS_CACHE] ? | ||
pe[pe.REDIS_CACHE] : PRIMARY_REDIS, | ||
|
||
/* | ||
* Keys for tracking rate limiter activity | ||
*/ | ||
limiter: pe.REDIS_LIMITER && pe[pe.REDIS_LIMITER] ? | ||
pe[pe.REDIS_LIMITER] : PRIMARY_REDIS, | ||
|
||
/* | ||
* PubSub for real-time events. | ||
*/ | ||
pubsub: pe.REDIS_PUBSUB && pe[pe.REDIS_PUBSUB] ? | ||
pe[pe.REDIS_PUBSUB] : PRIMARY_REDIS, | ||
|
||
/* | ||
* Kue job queue for work being delegated to worker dynos. | ||
*/ | ||
queue: pe.REDIS_QUEUE && pe[pe.REDIS_QUEUE] ? | ||
pe[pe.REDIS_QUEUE] : PRIMARY_REDIS, | ||
|
||
/* | ||
* Transient data about socket connections from browsers with an open | ||
* perspective, for logging activity=realtime. | ||
*/ | ||
realtimeLogging: pe.REDIS_REALTIME_LOGGING && | ||
pe[pe.REDIS_REALTIME_LOGGING] ? pe[pe.REDIS_REALTIME_LOGGING] : | ||
PRIMARY_REDIS, | ||
|
||
/* | ||
* SampleStore is the primary persistent store for samples, and an active | ||
* cache for aspects and subjects. | ||
*/ | ||
sampleStore: pe.REDIS_SAMPLE_STORE && pe[pe.REDIS_SAMPLE_STORE] ? | ||
pe[pe.REDIS_SAMPLE_STORE] : PRIMARY_REDIS, | ||
|
||
/* | ||
* Active browser sessions. | ||
*/ | ||
session: pe.REDIS_SESSION && pe[pe.REDIS_SESSION] ? | ||
pe[pe.REDIS_SESSION] : PRIMARY_REDIS, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters