|
@@ -53,6 +53,7 @@ import static io.renren.common.utils.ShiroUtils.getUserId;
|
|
|
* @Date: 2021/6/11 16:28
|
|
|
*/
|
|
|
@Slf4j
|
|
|
+@Transactional
|
|
|
@RestController
|
|
|
@RequestMapping("/algstrain")
|
|
|
public class algTrainController {
|
|
@@ -348,7 +349,10 @@ public class algTrainController {
|
|
|
"这是心跳信息"
|
|
|
);
|
|
|
|
|
|
- if(subscriber.listener != null && subscriber.listener.isRequest == 1 && !subscriber.listener.algMap.isEmpty()) {
|
|
|
+ if(subscriber.listener != null
|
|
|
+ && subscriber.listener.isRequest == 1
|
|
|
+ && !subscriber.listener.algMap.isEmpty()) {
|
|
|
+ subscriber.listener.isRunning = 1; //设置正在运行,其余的消息丢弃
|
|
|
for(Map.Entry<String, String> map : subscriber.listener.algMap.entrySet()){
|
|
|
String key = map.getKey();
|
|
|
String missName = map.getValue();
|
|
@@ -357,17 +361,19 @@ public class algTrainController {
|
|
|
continue;
|
|
|
}
|
|
|
Long algorithmTrainingId = algTrain.getAlgorithmTrainingId();
|
|
|
- executorService.submit(() -> {
|
|
|
- try {
|
|
|
- changeMissStatus(String.valueOf(algorithmTrainingId));
|
|
|
- startTraining(String.valueOf(algorithmTrainingId));
|
|
|
- } catch (Exception e) {
|
|
|
- throw new RRException(e.getMessage());
|
|
|
- }
|
|
|
- });
|
|
|
+ changeMissStatus(String.valueOf(algorithmTrainingId));
|
|
|
+ startTraining(String.valueOf(algorithmTrainingId));
|
|
|
+// executorService.submit(() -> {
|
|
|
+// try {
|
|
|
+//
|
|
|
+// } catch (Exception e) {
|
|
|
+// throw new RRException(e.getMessage());
|
|
|
+// }
|
|
|
+// });
|
|
|
|
|
|
}
|
|
|
subscriber.listener.algMap.clear();
|
|
|
+ subscriber.listener.isRunning = 0;
|
|
|
}
|
|
|
}
|
|
|
|