From f367a521fb84f994fd64d31d30a86f10d6f66535 Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Fri, 23 Aug 2024 15:22:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=A1=B9=E7=9B=AE=E7=BB=93?= =?UTF-8?q?=E6=9E=84=EF=BC=8C=E6=A8=A1=E5=9D=97=E5=91=BD=E5=90=8D=E6=9C=80?= =?UTF-8?q?=E5=A5=BD=E4=B8=8D=E8=A6=81=E5=92=8C=E5=8C=85=E5=90=8D=E7=9B=B8?= =?UTF-8?q?=E5=90=8C=EF=BC=8C=E5=AE=B9=E6=98=93=E5=AF=BC=E8=87=B4=E5=AF=BC?= =?UTF-8?q?=E5=8C=85=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- photo_mask.py | 4 ++-- photo_mask/{photo_mask.py => auto_photo_mask.py} | 0 .../photo_mask_batch_error_check.py | 2 +- .../photo_mask_error_check.py | 4 ++-- .../photo_mask_error_report.py | 2 +- photo_review.py | 4 ++-- photo_review/{photo_review.py => auto_photo_review.py} | 0 7 files changed, 8 insertions(+), 8 deletions(-) rename photo_mask/{photo_mask.py => auto_photo_mask.py} (100%) rename photo_mask_batch_error_check.py => photo_mask/photo_mask_batch_error_check.py (95%) rename photo_mask_error_check.py => photo_mask/photo_mask_error_check.py (96%) rename photo_mask_error_report.py => photo_mask/photo_mask_error_report.py (96%) rename photo_review/{photo_review.py => auto_photo_review.py} (100%) diff --git a/photo_mask.py b/photo_mask.py index ab8c100..317b8ad 100644 --- a/photo_mask.py +++ b/photo_mask.py @@ -9,7 +9,7 @@ from auto_email.error_email import send_error_email from db import MysqlSession from db.mysql import ZxPhhd from log import LOGGING_CONFIG -from photo_mask import photo_mask, SEND_ERROR_EMAIL +from photo_mask import auto_photo_mask, SEND_ERROR_EMAIL if __name__ == '__main__': program_name = "照片审核自动涂抹脚本" @@ -31,7 +31,7 @@ if __name__ == '__main__': try: logging.info(f"【{program_name}】开始运行") - photo_mask.main() + auto_photo_mask.main() except Exception as e: error_logger = logging.getLogger("error") error_logger.error(traceback.format_exc()) diff --git a/photo_mask/photo_mask.py b/photo_mask/auto_photo_mask.py similarity index 100% rename from photo_mask/photo_mask.py rename to photo_mask/auto_photo_mask.py diff --git a/photo_mask_batch_error_check.py b/photo_mask/photo_mask_batch_error_check.py similarity index 95% rename from photo_mask_batch_error_check.py rename to photo_mask/photo_mask_batch_error_check.py index f4c4222..3ad78c0 100644 --- a/photo_mask_batch_error_check.py +++ b/photo_mask/photo_mask_batch_error_check.py @@ -5,7 +5,7 @@ from sqlalchemy import and_ from db import MysqlSession from db.mysql import ZxIeOcrerror -from photo_mask_error_check import check_error +from photo_mask.photo_mask_error_check import check_error if __name__ == '__main__': today = date.today() diff --git a/photo_mask_error_check.py b/photo_mask/photo_mask_error_check.py similarity index 96% rename from photo_mask_error_check.py rename to photo_mask/photo_mask_error_check.py index 012b62e..ca5ecc8 100644 --- a/photo_mask_error_check.py +++ b/photo_mask/photo_mask_error_check.py @@ -6,7 +6,7 @@ from sqlalchemy import update, and_, select, exists from db import MysqlSession from db.mysql import ZxIeOcrerror, ZxPhrec -from photo_mask.photo_mask import mask_photo +from photo_mask.auto_photo_mask import mask_photo from ucloud import ufile from util import image_util, util @@ -53,7 +53,7 @@ if __name__ == '__main__': ocr_error = (session.query(ZxIeOcrerror.pk_phrec, ZxIeOcrerror.cXm, ZxIeOcrerror.cSfzh, ZxIeOcrerror.cfjaddress, ZxIeOcrerror.cfjaddress2) .filter(and_(ZxIeOcrerror.checktime.is_(None), - ZxIeOcrerror.creationtime >= today, + # ZxIeOcrerror.creationtime >= today, ZxIeOcrerror.creationtime < today + timedelta(days=1))) .limit(1).one()) session.close() diff --git a/photo_mask_error_report.py b/photo_mask/photo_mask_error_report.py similarity index 96% rename from photo_mask_error_report.py rename to photo_mask/photo_mask_error_report.py index 4cf8507..c458171 100644 --- a/photo_mask_error_report.py +++ b/photo_mask/photo_mask_error_report.py @@ -6,7 +6,7 @@ from sqlalchemy import update, and_ from db import MysqlSession from db.mysql import ZxIeOcrerror -from photo_mask_error_check import auto_check_error +from photo_mask.photo_mask_error_check import auto_check_error from util import util if __name__ == '__main__': diff --git a/photo_review.py b/photo_review.py index 8b19398..232376a 100644 --- a/photo_review.py +++ b/photo_review.py @@ -9,7 +9,7 @@ from auto_email.error_email import send_error_email from db import MysqlSession from db.mysql import ZxPhhd from log import LOGGING_CONFIG -from photo_review import photo_review, SEND_ERROR_EMAIL +from photo_review import auto_photo_review, SEND_ERROR_EMAIL # 项目必须从此处启动,否则代码中的相对路径可能导致错误的发生 if __name__ == '__main__': @@ -32,7 +32,7 @@ if __name__ == '__main__': try: logging.info(f"【{program_name}】开始运行") - photo_review.main() + auto_photo_review.main() except Exception as e: error_logger = logging.getLogger('error') error_logger.error(traceback.format_exc()) diff --git a/photo_review/photo_review.py b/photo_review/auto_photo_review.py similarity index 100% rename from photo_review/photo_review.py rename to photo_review/auto_photo_review.py