一键报警间隔改为1分钟
This commit is contained in:
parent
798158dc23
commit
582eca2df3
|
@ -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()
|
||||
# 查询定位信息
|
||||
|
|
Loading…
Reference in New Issue