一键报警事件2分钟

This commit is contained in:
曹前明 2022-09-14 17:07:15 +08:00
parent 582eca2df3
commit a644292590
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=1) > timezone.now():
if last_event and last_event.create_time + timedelta(minutes=2) > timezone.now():
return
event = Event()
# 查询定位信息