refactor: アルトマーク関連処理の関数を修正。データ出力は別関数にする予定。
This commit is contained in:
parent
9aa585c7d9
commit
370aea3fa2
@ -14,9 +14,10 @@ logger = get_logger('アルトマークデータ保管')
|
||||
ultmarc_bucket = UltmarcBucket()
|
||||
|
||||
|
||||
def batch_process():
|
||||
def import_process():
|
||||
"""アルトマーク取り込み処理"""
|
||||
try:
|
||||
logger.info('datInsert START')
|
||||
logger.info('ultmarc import process START')
|
||||
# DBセットアップ
|
||||
db = Database.get_instance()
|
||||
db.connect()
|
||||
@ -77,7 +78,7 @@ def batch_process():
|
||||
# すべての行を登録終えたらコミットする
|
||||
db.commit()
|
||||
logger.info('Transaction COMMIT')
|
||||
logger.info(f'datInsert RESULT')
|
||||
logger.info(f'ultmarc import process RESULT')
|
||||
logger.info(f'SUCCESS_COUNT={dat_file.success_count}')
|
||||
logger.info(f'ERROR_COUNT={dat_file.error_count}')
|
||||
logger.info(f'ALL_COUNT={dat_file.total_count}')
|
||||
|
||||
@ -73,7 +73,7 @@ def batch_process():
|
||||
logger.info('日次処理(アルトマーク)実行対象日でない為未実行')
|
||||
try:
|
||||
logger.info('アルトマーク取込:起動')
|
||||
ultmarc_process.batch_process()
|
||||
ultmarc_process.import_process()
|
||||
logger.info('アルトマーク取込:終了')
|
||||
except BatchOperationException as e:
|
||||
logger.error(f'アルトマーク取込処理エラー(異常終了){e}')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user