Skip to content

Commit cf7fec1

Browse files
Change the cpu usage interval from second to minute (#2729)
feature(check_cpu_usage): Change the usage interval from second to minute
1 parent 361849b commit cf7fec1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/job/check_cpu_usage.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func (j *CheckCpuJob) Run() {
2323
threshold, _ := j.settingService.GetTgCpu()
2424

2525
// get latest status of server
26-
percent, err := cpu.Percent(1*time.Second, false)
26+
percent, err := cpu.Percent(1*time.Minute, false)
2727
if err == nil && percent[0] > float64(threshold) {
2828
msg := j.tgbotService.I18nBot("tgbot.messages.cpuThreshold",
2929
"Percent=="+strconv.FormatFloat(percent[0], 'f', 2, 64),

0 commit comments

Comments
 (0)