添加耗时到数据库,方便统计

This commit is contained in:
2024-08-14 16:05:17 +08:00
parent 349538d9f8
commit 326a4d14ba
3 changed files with 8 additions and 3 deletions

View File

@@ -328,6 +328,7 @@ def main():
for phhd in phhds:
pk_phhd = phhd.pk_phhd
logging.info(f"开始识别:{pk_phhd}")
start_time = time.time()
photo_review(pk_phhd)
# 识别完成更新标识
@@ -335,7 +336,8 @@ def main():
update_flag = (update(ZxPhhd).where(ZxPhhd.pk_phhd == pk_phhd).values(
exsuccess_flag="8",
ref_id1=HOSTNAME,
checktime=util.get_default_datetime()))
checktime=util.get_default_datetime(),
fFSYLFY=time.time() - start_time))
session.execute(update_flag)
session.commit()
session.close()