diff --git a/ecs/jskult-batch/src/aws/s3.py b/ecs/jskult-batch/src/aws/s3.py index c5868f68..c44e61b0 100644 --- a/ecs/jskult-batch/src/aws/s3.py +++ b/ecs/jskult-batch/src/aws/s3.py @@ -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) \ No newline at end of file + jskult_backup_bucket._bucket_name, backup_key)