Merge pull request #370 master into develop
This commit is contained in:
commit
9ac9dd8376
@ -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}')
|
||||
|
||||
@ -75,7 +75,9 @@ def lambda_handler(event, context):
|
||||
s3_client.copy_object(
|
||||
Bucket=ENCISE_BACKUP_BUCKET,
|
||||
Key=f'{event_folder_name}/{execute_date_yyyymm}/{event_file_name}',
|
||||
CopySource=copy_source
|
||||
CopySource=copy_source,
|
||||
ContentType='text/csv', # ファイルのタイプを指定する必要があるため、ContentTypeを指定する。
|
||||
MetadataDirective='REPLACE' # ファイルのメタデータを置き換える必要があるため、MetadataDirectiveを指定する。
|
||||
)
|
||||
logger.info(f'I-04-01 Encise受信データのバックアップ完了:{ENCISE_BACKUP_BUCKET}/{event_folder_name}/{execute_date_yyyymm}/{event_file_name}')
|
||||
|
||||
@ -83,7 +85,9 @@ def lambda_handler(event, context):
|
||||
s3_client.copy_object(
|
||||
Bucket=DATA_IMPORT_BUCKET,
|
||||
Key=f'{ENCISE_TARGET_FOLDER}/{event_file_name}',
|
||||
CopySource=copy_source
|
||||
CopySource=copy_source,
|
||||
ContentType='text/csv', # ファイルのタイプを指定する必要があるため、ContentTypeを指定する。
|
||||
MetadataDirective='REPLACE' # ファイルのメタデータを置き換える必要があるため、MetadataDirectiveを指定する。
|
||||
)
|
||||
# コピー後、元のバケットからは削除する
|
||||
s3_client.delete_object(Bucket=event_bucket_name, Key=event_object_key)
|
||||
|
||||
@ -45,7 +45,7 @@ resource:
|
||||
# セキュリティグループ(ecs-jskult-batch-laundering)
|
||||
- &PRD_SG_JSKULT_BATCH_LAUNDERING "sg-0d2bc30c1a2939c32"
|
||||
# セキュリティグループ(ecs-export-dbdump)
|
||||
- &PRD_SG_EXPORT_DBDUMP "sg-xxxxxxxxxxxxxxxx"
|
||||
- &PRD_SG_EXPORT_DBDUMP "sg-07ce73feffb53fadc"
|
||||
config:
|
||||
# CRMデータ取得
|
||||
r-crm-datafetch-state:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user