feat: ローカルで実行できるように実行用コードを追加。普段はコメントアウト。

This commit is contained in:
shimoda.m@nds-tyo.co.jp 2023-01-27 17:58:29 +09:00
parent 419bad2690
commit 7a86e834dc
3 changed files with 26 additions and 1 deletions

View File

@ -145,3 +145,16 @@ def is_empty_file(work_csv_row: list, settings_list: list):
return len(work_csv_row[1:]) == 0
return len(work_csv_row) == 0
# ローカル実行用コード
# 値はよしなに変えてください
# if __name__ == '__main__':
# check(
# bucket_name='バケット名',
# target_data_source='データソース名',
# target_file_name='targetフォルダ内のファイル名',
# settings_key='個別設定ファイル名',
# log_info='Info',
# mode='i'
# )

View File

@ -86,7 +86,7 @@ def end(bucket_name, target_data_source, target_file_name, warning_info, log_inf
error(bucket_name, target_data_source, target_file_name, log_info)
# テスト用コード
# ローカル実行用コード
# 値はよしなに変えてください
# if __name__ == '__main__':
# end(

View File

@ -155,3 +155,15 @@ def init(bucket_name, target_key, target_data_source, target_file_name, log_info
except Exception as e:
print(f'{datetime.now():%Y-%m-%d %H:%M:%S} {log_info} {LOG_LEVEL["e"]} E-INI-99 - エラー内容:{e}')
error(bucket_name, target_data_source, target_file_name, log_info)
# ローカル実行用コード
# 値はよしなに変えてください
# if __name__ == '__main__':
# init(
# bucket_name='バケット名',
# target_key='データソース名/target/ファイル名',
# target_data_source='データソース名',
# target_file_name='ファイル名',
# log_info='Info',
# mode='i'
# )