Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherBThai authored Oct 19, 2020
2 parents 6249eb6 + b2f16d9 commit a90a3d3
Show file tree
Hide file tree
Showing 110 changed files with 3,415 additions and 1,205 deletions.
17 changes: 10 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const config = require('./src/data/config.json');
// Grab tokens and secret files
const debug = config.debug;
if(!debug) var tracer = require('dd-trace').init();

if(debug) var auth = require('../tokens/scuttester-auth.json');
else var auth = require('../tokens/owo-auth.json');

Expand All @@ -25,25 +26,27 @@ if(require('cluster').isMaster){
const RamCheck = new (require('./utils/ramCheck.js'))(global);
}

const totalShards = 8;
const totalShards = 10;

(async () => {
try{
//determine how many shards we will need for this manager
if (!debug&&require('cluster').isMaster){
result = await request.fetchInit();
shards = result["shards"];
firstShardID = result["firstShardID"];
lastShardID = result["lastShardID"];
console.log(result);
shards = parseInt(result["shards"]);
firstShardID = parseInt(result["firstShardID"]);
lastShardID = parseInt(result["lastShardID"]);
}
// How many clusters we will have
var clusters = Math.ceil(shards/totalShards);
if(debug){
shards = 2;
shards = 1;
firstShardID = 0;
lastShardID = shards-1;
clusters = 1;
lastShardID = 1;
clusters = 1
}

console.log("Creating shards "+firstShardID+"~"+lastShardID+" out of "+shards+" total shards!");

// Start sharder
Expand Down
Loading

0 comments on commit a90a3d3

Please sign in to comment.