ec_codes log
This commit is contained in:
parent
55aff64b5f
commit
5d0dfa5deb
|
@ -657,6 +657,7 @@ def snap_and_analyse(vchannel: TDevice, algo_codes: list, opl: Opl):
|
|||
global_img_o = dhClient.snap(vchannel.code)
|
||||
happen_time = timezone.now()
|
||||
ec_codes = ai_analyse(algo_codes, global_img=global_img_o) # 算法处理返回的事件结果
|
||||
myLogger.info('触发事件:' + str(ec_codes))
|
||||
if ec_codes:
|
||||
# 获取本次所有发生事件种类
|
||||
ecs = EventCate.objects.filter(code__in=ec_codes.keys())
|
||||
|
|
|
@ -89,4 +89,4 @@ def opl_task(vc_codes: list, opl_id: str):
|
|||
while time.time()-start_time < 28800: # 一次任务不手动关闭最多持续8小时
|
||||
for i in vchannels:
|
||||
Thread(target=snap_and_analyse, args=(i, algo_codes, opl)).start()
|
||||
time.sleep(4)
|
||||
time.sleep(10)
|
||||
|
|
Loading…
Reference in New Issue