diff --git a/ecs/jskult-batch/src/manager/jskult_batch_run_manager.py b/ecs/jskult-batch/src/manager/jskult_batch_run_manager.py new file mode 100644 index 00000000..3a55f7b9 --- /dev/null +++ b/ecs/jskult-batch/src/manager/jskult_batch_run_manager.py @@ -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 \ No newline at end of file