From 186b69af2048209498d3de599b76cb2cfce6d7fb Mon Sep 17 00:00:00 2001 From: zhaolei <256168157@qq.com> Date: Wed, 21 Oct 2026 15:08:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B8=85=E7=90=86=E5=B7=A1=E6=A3=80?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=E8=B0=83=E5=BA=A6=E5=99=A8=E6=AE=8B=E7=95=99?= =?UTF-8?q?=E4=B8=B4=E6=97=B6=E8=B0=83=E8=AF=95=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/state/useReportAutoScheduler.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/application/state/useReportAutoScheduler.ts b/application/state/useReportAutoScheduler.ts index 2787e46..c1a3411 100644 --- a/application/state/useReportAutoScheduler.ts +++ b/application/state/useReportAutoScheduler.ts @@ -178,14 +178,12 @@ export function useReportAutoScheduler() { const tick = useCallback(async () => { if (runningRef.current) return; const cfg = scheduleRef.current; - // 临时验证:忽略 enabled 检查 - // if (!cfg?.enabled) return; + if (!cfg?.enabled) return; if (cfg.enabledDeviceIds && cfg.enabledDeviceIds.length === 0) return; - const intervalMs = 2 * 60 * 1000; // 临时验证:强制 2 分钟 + const intervalMs = (cfg.defaultIntervalHours || 1) * 3600 * 1000; const now = Date.now(); - // 临时验证:首次立即执行,不等快照时间 if (lastRunAtRef.current !== 0 && now - lastRunAtRef.current < intervalMs) return; runningRef.current = true;