fix: prevent duplicate pending aggregation tasks
This commit is contained in:
1 parent
0bad1e2a40
commit
dd28f3c0cb
3 files changed
+35
-1
No files matched your search
@@ -39,6 +39,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectUsdtAggregationTaskVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectPendingTaskByAppId" resultMap="UsdtAggregationTaskResult">
|
||||
<include refid="selectUsdtAggregationTaskVo"/>
|
||||
where app_id = #{appId}
|
||||
and status = 0
|
||||
and verify_status in (0, 1)
|
||||
and deleted_at is null
|
||||
order by created_at asc, id asc
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertUsdtAggregationTask" parameterType="UsdtAggregationTask" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into usdt_aggregation_task
|
||||
@@ -98,4 +108,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
</mapper>
|
||||
Reference in new issue
Block a user