一键报警间隔改为1分钟

This commit is contained in:
曹前明 2022-09-14 16:54:59 +08:00
parent 798158dc23
commit 582eca2df3
1 changed files with 1 additions and 1 deletions

View File

@ -491,7 +491,7 @@ def handle_xx_event(name: str, data: dict):
# 找到最近未处理同一人发生的事件
if cate:
last_event = Event.objects.filter(cates__code=name, employee=blts.employee, handle_user=None).order_by('-create_time').first()
if last_event and last_event.create_time + timedelta(minutes=5) > timezone.now():
if last_event and last_event.create_time + timedelta(minutes=1) > timezone.now():
return
event = Event()
# 查询定位信息