diff options
| author | UltraMegaPotato <cookiecactusmilk@gmail.com> | 2025-03-06 22:38:58 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-06 22:38:58 +0300 |
| commit | cf7fec1351e44c624e599c226c35748f187ff8d1 (patch) | |
| tree | dc70091a0c41faa9d17789dad9905bcea2cb5aac /web | |
| parent | 361849b9dbbc11a49a251f81c4ff7bed06d243f4 (diff) | |
Change the cpu usage interval from second to minute (#2729)
feature(check_cpu_usage): Change the usage interval from second to minute
Diffstat (limited to 'web')
| -rw-r--r-- | web/job/check_cpu_usage.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web/job/check_cpu_usage.go b/web/job/check_cpu_usage.go index 30ce4db6..cd9fcc9a 100644 --- a/web/job/check_cpu_usage.go +++ b/web/job/check_cpu_usage.go @@ -23,7 +23,7 @@ func (j *CheckCpuJob) Run() { threshold, _ := j.settingService.GetTgCpu() // get latest status of server - percent, err := cpu.Percent(1*time.Second, false) + percent, err := cpu.Percent(1*time.Minute, false) if err == nil && percent[0] > float64(threshold) { msg := j.tgbotService.I18nBot("tgbot.messages.cpuThreshold", "Percent=="+strconv.FormatFloat(percent[0], 'f', 2, 64), |
