Skip to content

Commit

Permalink
fix: malperformant alerts for tweets, some missing commands
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTenno committed Nov 1, 2018
1 parent a96bddb commit d2f72e7
Show file tree
Hide file tree
Showing 11 changed files with 427 additions and 542 deletions.
2 changes: 1 addition & 1 deletion commands.json

Large diffs are not rendered by default.

13 changes: 1 addition & 12 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const cluster = require('cluster');
const Raven = require('raven');

const Genesis = require('./src/bot');
const TwitterCache = require('./src/TwitterCache.js');

let controlHook;
if (process.env.CONTROL_WH_ID) {
Expand Down Expand Up @@ -40,16 +39,6 @@ process.on('unhandledRejection', (err) => {
logger.error(err);
});

let twitterCache;

try {
twitterCache = new TwitterCache(logger);
} catch (err) {
logger.error(err);
twitterCache = undefined;
}


if (process.env.NODE_ENV !== 'production') {
// eslint-disable-next-line global-require
require('./src/tools/generateManifest.js')();
Expand All @@ -64,7 +53,7 @@ if (cluster.isMaster) {
clusterManager.start();
} else {
const totalShards = parseInt(process.env.SHARDS, 10) || 1;
const shard = new Genesis(process.env.TOKEN, logger, twitterCache, {
const shard = new Genesis(process.env.TOKEN, logger, {
shardId: parseInt(process.env.shard_id, 10),
shardCount: totalShards,
prefix: process.env.PREFIX,
Expand Down
Loading

0 comments on commit d2f72e7

Please sign in to comment.