fix: 修复日志格式化字符串错误和任务奖励逻辑
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-04-10 10:28:22 +08:00
parent 061e4f0c51
commit 0daeb70900
6 changed files with 68 additions and 149 deletions

View File

@@ -52,7 +52,7 @@ func PprofWeb() {
}
// 所有端口都失败时的兜底
errMsg := fmt.Sprintf("[FATAL] 端口9909/9910均监听失败pprof服务启动失败")
errMsg := "[FATAL] 端口9909/9910均监听失败pprof服务启动失败"
fmt.Println(errMsg)
// 可选根据业务需求决定是否panic
// panic(errMsg)
@@ -148,7 +148,7 @@ func monitorMemAndQuit() {
// 4. 超70%阈值,执行优雅退出
if usedRatio >= memThresholdRatio {
log.Fatalf("内存占比达%.1f%%超过90%阈值,程序开始退出", usedRatio*100)
log.Fatalf("内存占比达%.1f%%超过90%%阈值,程序开始退出", usedRatio*100)
// ########## 可选:这里添加你的优雅清理逻辑 ##########
// 如:关闭数据库连接、释放文件句柄、保存业务状态、推送退出告警等
cleanup()