バッチ実行管理テーブル(DynamoDB)操作クラスの実装

This commit is contained in:
mori.k 2025-05-21 18:14:57 +09:00
parent b6e3252dac
commit 85647c2563

View File

@ -0,0 +1,28 @@
class JskultBatchRunManager:
def __init__(self, execution_id: str):
self._execution_id: str = execution_id
def batch_success(self):
try:
self._put_dynamodb_record('success')
except Exception as e:
raise e
def batch_failed(self):
try:
self._put_dynamodb_record('failed')
except Exception as e:
raise e
def batch_retry(self):
try:
self._put_dynamodb_record('retry')
except Exception as e:
raise e
def _put_dynamodb_record(self, execution_id: str):
try:
self._execution_id = execution_id
# TODO バッチ実行管理テーブルの登録、更新upsert)
except Exception as e:
raise e