Commit 17503f3d by fudahua

feat: 正在处理的

parent beac7bc4
......@@ -609,9 +609,12 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
// }
// }
//之前正在处理的队列需要重新处理
List<DownloadTask> tasks = DownloadTaskServiceImpl.getInstance().getDownloadTaskOfBuilding(QueryDataSource.FLAT_QUERY);
logger.info("初始化任务:{}",JSONObject.toJSONString(tasks));
for (DownloadTask task : tasks) {
List<DownloadRecord> list = this.downloadTaskService.listUnDownloadTask(QueryDataSource.FLAT_QUERY);
// List<DownloadTask> tasks = DownloadTaskServiceImpl.getInstance().getDownloadTaskOfBuilding(QueryDataSource.FLAT_QUERY);
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();
Object cache = RedisUtil.getCache(key);
if (cache!=null) {
......@@ -619,9 +622,9 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
}
delFileOrDirByTaskId(task.getId());
//重新处理
task.setStatus(DownloadTaskStatus.WAITING);
task.setDownloadTime(new Date());
DownloadTaskServiceImpl.getInstance().updateDownloadTask(task);
downloadTask.setStatus(DownloadTaskStatus.WAITING);
downloadTask.setDownloadTime(new Date());
DownloadTaskServiceImpl.getInstance().updateDownloadTask(downloadTask);
}
}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