refactor: queue
This commit is contained in:
@@ -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"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user