fix(1.5.0-beta1): 修复滑动窗口提取数据的时间间隔问题和完成时为设置delete的值

This commit is contained in:
opensnail 2025-04-22 22:09:03 +08:00
parent e75c56c248
commit edca09ea7c
2 changed files with 3 additions and 1 deletions

View File

@ -329,7 +329,7 @@ public class SlidingWindow<T> {
threadPoolExecutor.scheduleAtFixedRate(() -> {
try {
extract(LocalDateTime.now().minus(duration, chronoUnit));
extract(LocalDateTime.now());
} catch (Exception e) {
SnailJobLog.LOCAL.error("Sliding window exception", e);
}

View File

@ -168,12 +168,14 @@ public class RetryServiceImpl implements RetryService {
waitStrategyContext.setDelayLevel(retry.getRetryCount() + 1);
WaitStrategy waitStrategy = WaitStrategyEnum.getWaitStrategy(retrySceneConfig.getBackOff());
retry.setNextTriggerAt(waitStrategy.computeTriggerTime(waitStrategyContext));
retry.setDeleted(0L);
}
if (RetryStatusEnum.FINISH.getStatus().equals(retryStatusEnum.getStatus())) {
RetryLogMetaDTO retryLogMetaDTO = RetryTaskConverter.INSTANCE.toLogMetaDTO(retry);
retryLogMetaDTO.setTimestamp(DateUtils.toNowMilli());
SnailJobLog.REMOTE.info("============Manual operation completed============. <|>{}<|>", retryLogMetaDTO);
retry.setDeleted(retry.getId());
}
retry.setUpdateDt(LocalDateTime.now());