fix: Check failure data from 2 minutes ago

This commit is contained in:
zengliang 2023-12-12 21:16:24 +08:00
parent 7c2c4d99f5
commit 99d578a895

View File

@ -22,7 +22,7 @@ public class SecureInvokeRecordDao extends ServiceImpl<SecureInvokeRecordMapper,
public List<SecureInvokeRecord> getWaitRetryRecords() {
Date now = new Date();
//查2分钟前的失败数据避免刚入库的数据被查出来
DateTime afterTime = DateUtil.offsetMinute(now, (int) SecureInvokeService.RETRY_INTERVAL_MINUTES);
DateTime afterTime = DateUtil.offsetMinute(now, -(int) SecureInvokeService.RETRY_INTERVAL_MINUTES);
return lambdaQuery()
.eq(SecureInvokeRecord::getStatus, SecureInvokeRecord.STATUS_WAIT)
.lt(SecureInvokeRecord::getNextRetryTime, new Date())