[TEST] 배치 중복 실행 방지

This commit is contained in:
김현주
2025-07-21 10:21:15 +09:00
parent 3a32d743de
commit a885f860ad
10 changed files with 101 additions and 8 deletions

View File

@@ -23,6 +23,16 @@
VALUES (#{id}, #{type}, #{status}, #{startAt}, now())
</insert>
<!-- 에러 로그 insert -->
<insert id="createError">
<selectKey keyProperty="id" resultType="long" order="BEFORE">
SELECT nextval('batch_log_seq')
</selectKey>
INSERT INTO batch_log (id, type, status, error_message, start_at, created_at, created_host)
VALUES (#{id}, #{type}, #{status}, #{errorMessage}, now(), now(), #{hostName})
</insert>
<!-- 상태 업데이트 -->
<update id="update">
UPDATE batch_log