Skip to content

Commit

Permalink
remove unused codes
Browse files Browse the repository at this point in the history
  • Loading branch information
icebob committed Feb 27, 2018
1 parent 360cf01 commit 84ceb21
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion src/registry/node-catalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class NodeCatalog {
}

/**
* Check offline nodes. Remove which is older than 3 minutes.
* Check offline nodes. Remove which is older than 10 minutes.
*
* @memberof Transit
*/
Expand Down
6 changes: 0 additions & 6 deletions src/strategies/cpu-usage.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ class CpuUsageStrategy extends BaseStrategy {
let minEp = null;

const sampleCount = this.opts.sampleCount;

//console.log(list.map(ep => `${ep.node.id}: ${ep.node.cpu ? ep.node.cpu.toFixed(0) + "%": "-"}`).join(" | "));

const count = sampleCount <= 0 || sampleCount > list.length ? list.length : sampleCount;
for (let i = 0; i < count; i++) {
let ep;
Expand All @@ -64,8 +61,6 @@ class CpuUsageStrategy extends BaseStrategy {
}
const cpu = ep.node.cpu;

//console.log(" Check ", ep.node.id, ", CPU", cpu ? cpu.toFixed(0) + "%" : "-");

// Check CPU usage of endpoint
if (cpu != null) {

Expand All @@ -80,7 +75,6 @@ class CpuUsageStrategy extends BaseStrategy {

// Return the lowest CPU
if (minEp) {
//console.log("Selected: ", minEp.node.id, ", CPU", minEp.node.cpu ? minEp.node.cpu.toFixed(0) + "%" : "-");
return minEp;
}

Expand Down

0 comments on commit 84ceb21

Please sign in to comment.