エラーログ修正

This commit is contained in:
野間 2023-07-11 18:02:52 +09:00
parent c87bee4e9a
commit 1ae009115d

View File

@ -23,17 +23,17 @@ def exec():
# 日次バッチ処置中フラグ、dump処理状態区分を取得
batch_processing_flag, dump_status_kbn = get_batch_statuses()
except BatchOperationException as e:
logger.exception(f'次ジョブ取得エラー(異常終了):{e}')
logger.exception(f'付テーブル取得エラー(異常終了):{e}')
return constants.BATCH_EXIT_CODE_SUCCESS
# 日次バッチ処理中の場合、処理は行わない
if batch_processing_flag == constants.BATCH_ACTF_BATCH_IN_PROCESSING:
logger.error('日次ジョブ処理中エラー(異常終了)')
logger.error('日次バッチ処理中の為、処理を終了')
return constants.BATCH_EXIT_CODE_SUCCESS
# dump処理状態区分が処理中またはエラーの場合、処理は行わない
if dump_status_kbn == constants.DUMP_STATUS_KBN_PROCESSED or dump_status_kbn == constants.DUMP_STATUS_KBN_ERROR:
logger.error('dump処理状態区分エラー異常終了')
logger.error(f'dump処理状態区分が実行不可な状態の為、処理を終了 dump処理状態区分={dump_status_kbn}')
return constants.BATCH_EXIT_CODE_SUCCESS
# dump処理状態区分を処理中に更新
@ -73,7 +73,6 @@ def exec():
'--single-transaction',
'--set-gtid-purged=OFF',
environment.DB_SCHEMA
# 'src05'
]
mysqldump_process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# gzipコマンドを実行してdump結果を圧縮する
@ -117,6 +116,6 @@ def exec():
update_dump_status_kbn_in_error()
except BatchOperationException as e:
logger.exception(f'dump処理状態区分更新(処理中→エラー) エラー(異常終了):{e}')
raise e
return constants.BATCH_EXIT_CODE_SUCCESS
logger.exception(f'日次バッチ処理前DBダンプ取得中に想定外のエラーが発生しました :{e}')
raise e
return constants.BATCH_EXIT_CODE_SUCCESS