Merge pull request #168 feature-NEWDWH2021-1053-fix-log-message into develop

This commit is contained in:
朝倉 明日香 2023-04-20 11:05:25 +09:00
commit 6c74560ea7
3 changed files with 13 additions and 7 deletions

View File

@ -18,4 +18,10 @@ def exec():
# 施設担当者洗替
emp_chg_inst_laundering.exec()
# # 並列処理のテスト用コード
# import time
# for _ in range(100):
# logger.info('実績洗替処理中')
# time.sleep(0.25)
logger.info('実績更新:終了')

View File

@ -1,4 +1,4 @@
"""処理"""
"""処理"""
import concurrent.futures
@ -8,7 +8,7 @@ from src.error.exceptions import BatchOperationException
def exec():
# 並処理を開始
# 並処理を開始
with concurrent.futures.ThreadPoolExecutor(max_workers=2) as executor:
# 実績更新
@ -27,6 +27,6 @@ def exec():
if sales_laundering_exc is not None or create_bio_sales_lot_exc is not None:
sales_laundering_exc_message = str(sales_laundering_exc) if sales_laundering_exc is not None else ''
create_bio_sales_lot_exc_message = str(create_bio_sales_lot_exc) if create_bio_sales_lot_exc is not None else ''
raise BatchOperationException(f'処理中にエラーが発生しました。実績更新="{sales_laundering_exc_message}", 生物由来ロット分解={create_bio_sales_lot_exc_message}')
raise BatchOperationException(f'処理中にエラーが発生しました。実績更新="{sales_laundering_exc_message}", 生物由来ロット分解={create_bio_sales_lot_exc_message}')
return

View File

@ -98,12 +98,12 @@ def exec():
return constants.BATCH_EXIT_CODE_SUCCESS
try:
# 実績生物由来ロット分解と並処理
logger.info('処理(実績更新-生物由来ロット分解):起動')
# 実績生物由来ロット分解と並処理
logger.info('処理(実績更新-生物由来ロット分解):起動')
parallel_processes.exec()
logger.info('処理(実績更新-生物由来ロット分解):終了')
logger.info('処理(実績更新-生物由来ロット分解):終了')
except BatchOperationException as e:
logger.exception(f'処理(実績更新-生物由来ロット分解)エラー(異常終了){e}')
logger.exception(f'処理(実績更新-生物由来ロット分解)エラー(異常終了){e}')
return constants.BATCH_EXIT_CODE_SUCCESS
try: