mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-07 16:08:02 +08:00
新增 jitter_seconds 配置:每轮调度在 interval 基础上 ± [0, jitter] 均匀随机偏移触发,避免多个监控以固定节奏同步请求上游。 - ent schema 新增 jitter_seconds 字段(默认 0),附迁移 151 - 校验:jitter >= 0 且 interval - jitter >= 15s(创建/更新均校验) - runner 由固定 ticker 改为每轮重新随机化的 timer,0 抖动时行为不变 - 前端监控表单新增「随机抖动 (± 秒)」输入框,上限随间隔联动 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
8 lines
386 B
SQL
8 lines
386 B
SQL
-- Migration: 151_channel_monitor_jitter
|
|
-- 渠道监控新增正负随机抖动配置:每次调度在 interval_seconds 基础上
|
|
-- ± [0, jitter_seconds] 的均匀随机偏移,避免多个监控固定同步触发。
|
|
-- 0(默认)表示固定间隔,与历史行为一致。
|
|
|
|
ALTER TABLE channel_monitors
|
|
ADD COLUMN IF NOT EXISTS jitter_seconds INTEGER NOT NULL DEFAULT 0;
|