<commit_before>var RateLimiter = require("rolling-rate-limiter");
var Redis = require("redis");
var client = Redis.createClient();

var spotify_limiter = RateLimiter({
	redis: client,
	namespace: "spotify_rate_limit",
	interval: 6000000,
	maxInInterval: 8,
	minDifference: 800,
});

var echonest_limiter = RateLimiter({
	redis: client,
	namespace: "echonest_rate_limit",
	interval: 6000000,
	maxInInterval: 8,
	minDifference: 800,
});

module.exports = {
	Spotify: spotify_limiter,
	Echonest: echonest_limiter
}<commit_msg>fixed rate limited redis connection<commit_after>var RateLimiter = require("rolling-rate-limiter");
var Redis = require("redis");

var env 		 = process.env.NODE_ENV || "development";
var redis_config = require("../config/secrets.js")[env].database.redis;

var client = Redis.createClient(redis_config);

var spotify_limiter = RateLimiter({
	redis: client,
	namespace: "spotify_rate_limit",
	interval: 6000000,
	maxInInterval: 8,
	minDifference: 800,
});

var echonest_limiter = RateLimiter({
	redis: client,
	namespace: "echonest_rate_limit",
	interval: 6000000,
	maxInInterval: 8,
	minDifference: 800,
});

module.exports = {
	Spotify: spotify_limiter,
	Echonest: echonest_limiter
}
{'fraction_non_alphanumeric': 0.12686567164179105, 'fraction_numerical': 0.03648424543946932, 'mean_word_length': 6.315151515151515, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7105464', 'n_tokens_mistral': 486, 'n_tokens_neox': 435, 'n_words': 91}