Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUltraMegaPotato <cookiecactusmilk@gmail.com>2025-03-06 22:38:58 +0300
committerGitHub <noreply@github.com>2025-03-06 22:38:58 +0300
commitcf7fec1351e44c624e599c226c35748f187ff8d1 (patch)
treedc70091a0c41faa9d17789dad9905bcea2cb5aac
parent361849b9dbbc11a49a251f81c4ff7bed06d243f4 (diff)
Change the cpu usage interval from second to minute (#2729)
feature(check_cpu_usage): Change the usage interval from second to minute
-rw-r--r--web/job/check_cpu_usage.go2
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),