Remove junk from an old abandoned project

This commit is contained in:
Calvin Montgomery 2017-07-02 22:35:12 -07:00
parent 860775a90b
commit 00901f9cdb
9 changed files with 1 additions and 365 deletions

View file

@ -1,27 +0,0 @@
import logger from 'cytube-common/lib/logger';
import * as Switches from '../../switches';
class DualClusterClient {
constructor(authoritativeClient, altClient) {
this.authoritativeClient = authoritativeClient;
this.altClient = altClient;
}
getSocketConfig(channel) {
return this.authoritativeClient.getSocketConfig(channel).then(result => {
if (!Switches.isActive(Switches.DUAL_BACKEND)) {
return result;
}
return this.altClient.getSocketConfig(channel).then(altResult => {
result.alt = altResult.servers;
return result;
}).catch(error => {
logger.warn(`Error loading alt servers: ${error}`);
return result;
});
})
}
}
export { DualClusterClient };

View file

@ -1,22 +0,0 @@
import Promise from 'bluebird';
const ONE_SECOND = 1000;
const ERR_TIMEOUT = 'Timed out when retrieving server information';
class RedisClusterClient {
constructor(frontendPool) {
this.frontendPool = frontendPool;
}
getSocketConfig(channel) {
return this.frontendPool.getFrontends(channel).then(result => {
if (!Array.isArray(result)) {
result = [];
}
return { servers: result };
}).timeout(ONE_SECOND, ERR_TIMEOUT);
}
}
export { RedisClusterClient };