添加耗时到数据库,方便统计
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import logging.config
|
||||
import re
|
||||
import tempfile
|
||||
import time
|
||||
from time import sleep
|
||||
|
||||
import cv2
|
||||
@@ -267,6 +268,7 @@ def main():
|
||||
for phhd in phhds:
|
||||
pk_phhd = phhd.pk_phhd
|
||||
logging.info(f"开始涂抹:{pk_phhd}")
|
||||
start_time = time.time()
|
||||
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(
|
||||
paint_flag="8",
|
||||
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.commit()
|
||||
session.close()
|
||||
|
||||
Reference in New Issue
Block a user