バッチ実行管理テーブル(DynamoDB)操作クラスの実装
This commit is contained in:
parent
b6e3252dac
commit
85647c2563
28
ecs/jskult-batch/src/manager/jskult_batch_run_manager.py
Normal file
28
ecs/jskult-batch/src/manager/jskult_batch_run_manager.py
Normal 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
|
||||
Loading…
x
Reference in New Issue
Block a user