|
@@ -129,11 +129,13 @@ public class GisSurveyBizService {
|
|
|
/**
|
|
|
* 过期任务
|
|
|
* <p>用于检查和使任务过期</p>
|
|
|
+ *
|
|
|
+ * @param ttl 超时时间(分钟)
|
|
|
*/
|
|
|
public void expireResult(long ttl) {
|
|
|
//获取超时的id
|
|
|
List<GisSurveyCheckTaskId> taskIds = TIME_CACHE.entrySet().stream()
|
|
|
- .filter(entry -> Duration.between(entry.getValue(), LocalDateTime.now()).toMillis() > ttl)
|
|
|
+ .filter(entry -> Duration.between(entry.getValue(), LocalDateTime.now()).toMinutes() > ttl)
|
|
|
.map(Map.Entry::getKey)
|
|
|
.collect(Collectors.toList());
|
|
|
//停止超时的任务并删除任务缓存
|