We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 361849b commit cf7fec1Copy full SHA for cf7fec1
web/job/check_cpu_usage.go
@@ -23,7 +23,7 @@ func (j *CheckCpuJob) Run() {
23
threshold, _ := j.settingService.GetTgCpu()
24
25
// get latest status of server
26
- percent, err := cpu.Percent(1*time.Second, false)
+ percent, err := cpu.Percent(1*time.Minute, false)
27
if err == nil && percent[0] > float64(threshold) {
28
msg := j.tgbotService.I18nBot("tgbot.messages.cpuThreshold",
29
"Percent=="+strconv.FormatFloat(percent[0], 'f', 2, 64),
0 commit comments