refactor: queue

This commit is contained in:
tao.chen
2026-08-26 10:55:09 +08:00
parent 8c0e14987e
commit b25a889977
4 changed files with 83 additions and 45 deletions
-7
View File
@@ -3,8 +3,6 @@ package main
import (
"encoding/json"
"os"
"sync"
"time"
)
// Config 对应 config.json 结构
@@ -16,11 +14,6 @@ type Config struct {
var (
globalConfig Config
// lastExecMap 冷却去重状态,key: "repoName:ref", value: *debounceEntry
// 记录每个 key 上次实际执行时刻,冷却窗口内到达的 push 直接丢弃
lastExecMap sync.Map
// 防抖冷却时间限制:3 分钟
debounceDuration = 3 * time.Minute
// bark 推送消息
pushURL = "https://bark.maimaicuizhiji.top/push"
)