fix: 転送処理のバグ修正。

This commit is contained in:
shimoda.m@nds-tyo.co.jp 2025-05-22 09:15:44 +09:00
parent a54d08aedd
commit 5c5b40a6be
2 changed files with 6 additions and 7 deletions

View File

@ -6,7 +6,6 @@ import shutil
import tempfile
import boto3
from src.system_var import environment
@ -136,11 +135,11 @@ class UltmarcImportBucket(S3Bucket):
_folder = environment.ULTMARC_IMPORT_FOLDER
def transfer_file_to_import(self, target_file: dict):
backup_from_file_path = target_file.get("filename")
backup_to_filename = backup_from_file_path.replace(
f"{self._folder}/", "")
data_import_key = f'{self._folder}/{backup_to_filename}'
self._s3_client.copy(self._bucket_name, backup_from_file_path,
from_file_path = target_file.get("filename")
to_filename = from_file_path.replace(
f"{UltmarcBucket()._folder}/", "")
data_import_key = f'{self._folder}/{to_filename}'
self._s3_client.copy(self._bucket_name, from_file_path,
self._bucket_name, data_import_key)

View File

@ -113,7 +113,7 @@ class JskultHdkeTblManager:
finally:
self._db.disconnect()
# 日次バッチ処理中の場合、後続の処理は行わない
if batch_processing_flag == constants.BATCH_ACTF_BATCH_START:
if batch_processing_flag != constants.BATCH_ACTF_BATCH_START:
return False
# dump取得が正常終了していない場合、後続の処理は行わない
if dump_status_kbn != constants.DUMP_STATUS_KBN_COMPLETE: