From ecf193e61f6f3e7d84cc6146441cd3cd7796ea5e Mon Sep 17 00:00:00 2001 From: "shimoda.m@nds-tyo.co.jp" Date: Wed, 19 Apr 2023 18:30:06 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E4=B8=A6=E8=A1=8C=E5=87=A6?= =?UTF-8?q?=E7=90=86=E2=86=92=E4=B8=A6=E5=88=97=E5=87=A6=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecs/jskult-batch-daily/src/batch/parallel_processes.py | 6 +++--- ecs/jskult-batch-daily/src/jobctrl_daily.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ecs/jskult-batch-daily/src/batch/parallel_processes.py b/ecs/jskult-batch-daily/src/batch/parallel_processes.py index 603b5e52..0fb2d715 100644 --- a/ecs/jskult-batch-daily/src/batch/parallel_processes.py +++ b/ecs/jskult-batch-daily/src/batch/parallel_processes.py @@ -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 diff --git a/ecs/jskult-batch-daily/src/jobctrl_daily.py b/ecs/jskult-batch-daily/src/jobctrl_daily.py index 3788d368..370f2179 100644 --- a/ecs/jskult-batch-daily/src/jobctrl_daily.py +++ b/ecs/jskult-batch-daily/src/jobctrl_daily.py @@ -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: From 149dbc5bf1a4fa25c50fb4ffdee4c7e6384eba4a Mon Sep 17 00:00:00 2001 From: "shimoda.m@nds-tyo.co.jp" Date: Wed, 19 Apr 2023 18:30:41 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E4=B8=A6=E5=88=97=E3=81=A7?= =?UTF-8?q?=E5=8B=95=E3=81=84=E3=81=A6=E3=81=84=E3=82=8B=E6=84=9F=E3=82=92?= =?UTF-8?q?=E5=87=BA=E3=81=99=E3=81=9F=E3=82=81=E3=81=AE=E3=83=86=E3=82=B9?= =?UTF-8?q?=E3=83=88=E7=94=A8=E3=82=B3=E3=83=BC=E3=83=89=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=E3=80=82=E6=99=AE=E6=AE=B5=E3=81=AF=E3=82=B3=E3=83=A1?= =?UTF-8?q?=E3=83=B3=E3=83=88=E3=82=A2=E3=82=A6=E3=83=88=E3=80=82=E6=9C=80?= =?UTF-8?q?=E7=B5=82=E7=9A=84=E3=81=AB=E3=81=AF=E6=B6=88=E3=81=99=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/batch/laundering/sales_laundering.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ecs/jskult-batch-daily/src/batch/laundering/sales_laundering.py b/ecs/jskult-batch-daily/src/batch/laundering/sales_laundering.py index 7b77d8ac..cb95b702 100644 --- a/ecs/jskult-batch-daily/src/batch/laundering/sales_laundering.py +++ b/ecs/jskult-batch-daily/src/batch/laundering/sales_laundering.py @@ -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('実績更新:終了')