Commit 5722251c zshaohui

1.增加超时时间

2.取消任务bug修改
1 个父辈 d675f15f
......@@ -163,10 +163,10 @@ public class StatusBean {
}
/**
* 是否超时(10秒)
* 是否超时(30秒)
*/
public boolean timeOut(){
return (System.currentTimeMillis() - time) >( 10 * 1000);
return (System.currentTimeMillis() - time) >( 30 * 1000);
}
/**
......
......@@ -315,13 +315,6 @@ public class TaskService {
private boolean cancelTask(DataLog task) {
if (task != null) {
//从正在执行和等待列表中移除
removeQueueTask(task);
task.setStatus(OP_STATUS.CANCEL.name());
task.setUpdateDate(new Date());
updateFinishedTask(task);
log.info("任务[" + task.getId() + "] posName[" + task.getPosName() + "] Reel Id[" + task.getBarcode() + "]取消成功");
//同时进行库位屏蔽
if (task.isExecuting()) {
String posName = task.getPosName();
......@@ -343,6 +336,12 @@ public class TaskService {
}
ReelLockPosUtil.removeReelLockPosInfo(task.getBarcode());
}
//从正在执行和等待列表中移除
removeQueueTask(task);
task.setStatus(OP_STATUS.CANCEL.name());
task.setUpdateDate(new Date());
updateFinishedTask(task);
log.info("任务[" + task.getId() + "] posName[" + task.getPosName() + "] Reel Id[" + task.getBarcode() + "]取消成功");
return true;
}
return false;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!