修复 ROI 区域内人员离开十几分钟未触发告警的问题。
Some checks failed
Python Test / test (push) Has been cancelled

1. 仍在 confirm_sec 滑动窗口内(未完成确认)
2. threshold_sec 阈值设置过长(需检查数据库实际配置值)
3. 新算法未被正确调用
This commit is contained in:
2026-01-22 12:22:26 +08:00
parent cc4f33c0fd
commit 20f295a491
3 changed files with 31 additions and 78 deletions

View File

@@ -90,9 +90,9 @@ class ROI(Base):
direction: Mapped[Optional[str]] = mapped_column(String(32))
stay_time: Mapped[Optional[int]] = mapped_column(Integer)
enabled: Mapped[bool] = mapped_column(Boolean, default=True)
threshold_sec: Mapped[int] = mapped_column(Integer, default=360)
confirm_sec: Mapped[int] = mapped_column(Integer, default=30)
return_sec: Mapped[int] = mapped_column(Integer, default=5)
threshold_sec: Mapped[int] = mapped_column(Integer, default=300)
confirm_sec: Mapped[int] = mapped_column(Integer, default=10)
return_sec: Mapped[int] = mapped_column(Integer, default=30)
pending_sync: Mapped[bool] = mapped_column(Boolean, default=False)
sync_version: Mapped[int] = mapped_column(Integer, default=0)
created_at: Mapped[datetime] = mapped_column(DateTime, default=datetime.utcnow)