添加耗时到数据库,方便统计
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
x-env:
|
x-env:
|
||||||
&template
|
&template
|
||||||
image: fcb_photo_review:1.12.3
|
image: fcb_photo_review:1.12.4
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import logging.config
|
import logging.config
|
||||||
import re
|
import re
|
||||||
import tempfile
|
import tempfile
|
||||||
|
import time
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
import cv2
|
import cv2
|
||||||
@@ -267,6 +268,7 @@ def main():
|
|||||||
for phhd in phhds:
|
for phhd in phhds:
|
||||||
pk_phhd = phhd.pk_phhd
|
pk_phhd = phhd.pk_phhd
|
||||||
logging.info(f"开始涂抹:{pk_phhd}")
|
logging.info(f"开始涂抹:{pk_phhd}")
|
||||||
|
start_time = time.time()
|
||||||
photo_mask(pk_phhd, phhd.cXm, phhd.cSfzh)
|
photo_mask(pk_phhd, phhd.cXm, phhd.cSfzh)
|
||||||
|
|
||||||
# 涂抹完成更新标识
|
# 涂抹完成更新标识
|
||||||
@@ -274,7 +276,8 @@ def main():
|
|||||||
update_flag = (update(ZxPhhd).where(ZxPhhd.pk_phhd == pk_phhd).values(
|
update_flag = (update(ZxPhhd).where(ZxPhhd.pk_phhd == pk_phhd).values(
|
||||||
paint_flag="8",
|
paint_flag="8",
|
||||||
paint_user=HOSTNAME,
|
paint_user=HOSTNAME,
|
||||||
paint_date=util.get_default_datetime()))
|
paint_date=util.get_default_datetime(),
|
||||||
|
fZcfwfy=time.time() - start_time))
|
||||||
session.execute(update_flag)
|
session.execute(update_flag)
|
||||||
session.commit()
|
session.commit()
|
||||||
session.close()
|
session.close()
|
||||||
|
|||||||
@@ -328,6 +328,7 @@ def main():
|
|||||||
for phhd in phhds:
|
for phhd in phhds:
|
||||||
pk_phhd = phhd.pk_phhd
|
pk_phhd = phhd.pk_phhd
|
||||||
logging.info(f"开始识别:{pk_phhd}")
|
logging.info(f"开始识别:{pk_phhd}")
|
||||||
|
start_time = time.time()
|
||||||
photo_review(pk_phhd)
|
photo_review(pk_phhd)
|
||||||
|
|
||||||
# 识别完成更新标识
|
# 识别完成更新标识
|
||||||
@@ -335,7 +336,8 @@ def main():
|
|||||||
update_flag = (update(ZxPhhd).where(ZxPhhd.pk_phhd == pk_phhd).values(
|
update_flag = (update(ZxPhhd).where(ZxPhhd.pk_phhd == pk_phhd).values(
|
||||||
exsuccess_flag="8",
|
exsuccess_flag="8",
|
||||||
ref_id1=HOSTNAME,
|
ref_id1=HOSTNAME,
|
||||||
checktime=util.get_default_datetime()))
|
checktime=util.get_default_datetime(),
|
||||||
|
fFSYLFY=time.time() - start_time))
|
||||||
session.execute(update_flag)
|
session.execute(update_flag)
|
||||||
session.commit()
|
session.commit()
|
||||||
session.close()
|
session.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user