Skip to content

Commit

Permalink
chore(master): cpu notify use cpuLimit
Browse files Browse the repository at this point in the history
  • Loading branch information
huangyoukun committed Sep 10, 2018
1 parent f3f87fd commit aed0b89
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/proxy/http.proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,10 @@ function heartBeat() {
}

// 高负载告警
if (global.cpuUsed80 === 4 && !config.isTest && !isWin32Like) {
afterCpu80(global.cpuUsed);
if (global.cpuUsed80 === 5 && !config.isTest && !isWin32Like) {
if (global.cpuUsed >= config.cpuLimit) {
afterCpu80(global.cpuUsed);
}
}

const currMemory = process.memoryUsage();
Expand Down

0 comments on commit aed0b89

Please sign in to comment.