From 6f814e83a49f43d232020c22ee324012ef11d22d Mon Sep 17 00:00:00 2001 From: "shimoda.m@nds-tyo.co.jp" Date: Mon, 11 Mar 2024 14:58:34 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20S11=20#13,=20#14=20=E6=9C=AA=E5=8F=97?= =?UTF-8?q?=E9=A0=98=E9=80=9A=E7=9F=A5=E5=B9=B4=E6=9C=88=E3=83=81=E3=82=A7?= =?UTF-8?q?=E3=83=83=E3=82=AF=E5=87=A6=E7=90=86=E3=81=AE=E4=B8=8D=E5=82=99?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../encise-data-unreceive-check.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lambda/encise-data-unreceive-check/encise-data-unreceive-check.py b/lambda/encise-data-unreceive-check/encise-data-unreceive-check.py index d762c275..389c82f9 100644 --- a/lambda/encise-data-unreceive-check/encise-data-unreceive-check.py +++ b/lambda/encise-data-unreceive-check/encise-data-unreceive-check.py @@ -223,8 +223,9 @@ def encise_data_unreceive_check(records: list, execute_month: str) -> tuple[list is_file_not_exists = False # 存在したファイルの年月部分を抜き出し、チェック対象年月(処理稼働月-1)である場合 match_group_yyyymm = match_result.group(1) - check_target_yyyymm = (datetime.datetime.now( - ZoneInfo(TZ)) - relativedelta(month=1)).strftime('%Y%m') + today = datetime.datetime.now(ZoneInfo(TZ)) + minus_1_month = today + relativedelta(months=-1) + check_target_yyyymm = minus_1_month.strftime('%Y%m') if match_group_yyyymm == check_target_yyyymm: logger.info( f'I-04-04 I/Fファイルの受領を確認しました ファイル名:{file_name}')