celery task 错误
This commit is contained in:
parent
f139b96c51
commit
47355e1e3a
|
@ -3,10 +3,11 @@ from multiprocessing import Event
|
|||
from threading import Thread
|
||||
|
||||
from celery import shared_task
|
||||
from apps.ai.main import ai_analyse
|
||||
|
||||
from apps.am.models import Area
|
||||
from apps.ecm.models import EventCate, Eventdo
|
||||
from apps.ecm.service import algo_handle, notify_event, save_dahua_pic
|
||||
from apps.ecm.service import notify_event, save_dahua_pic
|
||||
from apps.hrm.models import Employee
|
||||
from apps.opm.models import Opl
|
||||
from apps.third.clients import xxClient
|
||||
|
@ -80,7 +81,7 @@ def snap_and_analyse(code: str, algo_codes: list, opl_id: str):
|
|||
global_img_o = dhClient.snap(code)
|
||||
happen_time = timezone.now()
|
||||
vchannel = TDevice.objects.filter(code=code).first()
|
||||
ec_codes = algo_handle(algo_codes, data={}) # 算法处理返回的事件结果
|
||||
ec_codes = ai_analyse(algo_codes, global_img=global_img_o) # 算法处理返回的事件结果
|
||||
if ec_codes:
|
||||
# 获取本次所有发生事件种类
|
||||
ecs = EventCate.objects.filter(code__in=ec_codes)
|
||||
|
|
Loading…
Reference in New Issue