format: フォーマット修正

This commit is contained in:
shimoda.m@nds-tyo.co.jp 2025-06-12 14:52:24 +09:00
parent 92f250abdc
commit 9bd19142ea

View File

@ -2,6 +2,7 @@ import os.path as path
import tempfile
import boto3
from src.system_var import environment
@ -63,10 +64,10 @@ class ConfigBucket(S3Bucket):
jsk_archive_run_day_list_key = f'{environment.JSKULT_CONFIG_CALENDAR_FOLDER}/{environment.JSKULT_CONFIG_CALENDAR_RUN_ARCHIVE_DAY_FILE_NAME}'
with open(temporary_file_path, mode='wb') as f:
self._s3_client.download_file(
self._bucket_name, jsk_archive_run_day_list_key, f)
self._bucket_name, jsk_archive_run_day_list_key, f)
f.seek(0)
return temporary_file_path
def download_jsk_expected_data_list(self):
temporary_dir = tempfile.mkdtemp()
temporary_file_path = path.join(
@ -79,7 +80,6 @@ class ConfigBucket(S3Bucket):
return temporary_file_path
class JskUltBackupBucket(S3Bucket):
_bucket_name = environment.JSKULT_BACKUP_BUCKET
@ -122,4 +122,4 @@ class JskSendBucket(S3Bucket):
dat_key = f'{self._send_folder}/{dat_file_key}'
backup_key = f'{jskult_backup_bucket._folder}/{datetime_key}/{dat_file_key.replace(f"{self._send_folder}/", "")}'
self._s3_client.copy(self._bucket_name, dat_key,
jskult_backup_bucket._bucket_name, backup_key)
jskult_backup_bucket._bucket_name, backup_key)