Commit 17503f3d by fudahua

feat: 正在处理的

parent beac7bc4
...@@ -609,9 +609,12 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService { ...@@ -609,9 +609,12 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
// } // }
// } // }
//之前正在处理的队列需要重新处理 //之前正在处理的队列需要重新处理
List<DownloadTask> tasks = DownloadTaskServiceImpl.getInstance().getDownloadTaskOfBuilding(QueryDataSource.FLAT_QUERY); List<DownloadRecord> list = this.downloadTaskService.listUnDownloadTask(QueryDataSource.FLAT_QUERY);
logger.info("初始化任务:{}",JSONObject.toJSONString(tasks)); // List<DownloadTask> tasks = DownloadTaskServiceImpl.getInstance().getDownloadTaskOfBuilding(QueryDataSource.FLAT_QUERY);
for (DownloadTask task : tasks) { logger.info("初始化任务:{}",JSONObject.toJSONString(list));
for (DownloadRecord task : list) {
FlatQueryTaskCondition condition = JSON.parseObject(task.getDownloadCondition(), FlatQueryTaskCondition.class);
DownloadTask downloadTask = DownloadTaskServiceImpl.getInstance().getDownloadTaskById(condition.getTaskId());
String key=LOCK_KEY+":"+task.getId(); String key=LOCK_KEY+":"+task.getId();
Object cache = RedisUtil.getCache(key); Object cache = RedisUtil.getCache(key);
if (cache!=null) { if (cache!=null) {
...@@ -619,9 +622,9 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService { ...@@ -619,9 +622,9 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
} }
delFileOrDirByTaskId(task.getId()); delFileOrDirByTaskId(task.getId());
//重新处理 //重新处理
task.setStatus(DownloadTaskStatus.WAITING); downloadTask.setStatus(DownloadTaskStatus.WAITING);
task.setDownloadTime(new Date()); downloadTask.setDownloadTime(new Date());
DownloadTaskServiceImpl.getInstance().updateDownloadTask(task); DownloadTaskServiceImpl.getInstance().updateDownloadTask(downloadTask);
} }
}catch (Exception e){ }catch (Exception e){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment