重试策略
<!--
#处理失败时的重试次数
orderTaskWorker.retryCount=100
#重试时的权重,算法为:当前时间 + (rate * retryCount) > 更新时间时,可执行
orderTaskWorker.rate=100
-->
and RetryCount <= #retryCount#
and UpdateTime < dateadd(n, #rate# * RetryCount, getdate())
<!--解锁重置次数加一 -->
<update id="unlockTask" parameterClass="java.lang.Long">
update MayiTask
set
IsFinished = 0, RetryCount = RetryCount + 1, UpdateTime = getdate()
where Id = #value# and IsFinished = 100
</update>