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