|
@@ -83,22 +83,15 @@ public class SysConstants implements ApplicationContextAware {
|
|
|
// }
|
|
|
@Autowired
|
|
|
IMqEcsService mqEcsService;
|
|
|
- public String queueName = null;
|
|
|
|
|
|
@Value("${queue.modeling.modeling-call}")
|
|
|
- public void setQueueName(String queueNameDf) {
|
|
|
- queueName = queueNameDf;
|
|
|
- }
|
|
|
-
|
|
|
+ private String queueNameDf;
|
|
|
|
|
|
- public String getQueueName() {
|
|
|
- return queueName;
|
|
|
- }
|
|
|
|
|
|
- public void initIsResidenceService() {
|
|
|
+ public String initIsResidenceService() {
|
|
|
if(StringUtils.isEmpty(SysConstants.hostName)){
|
|
|
SysConstants.isResidenceService = true;
|
|
|
- return;
|
|
|
+ return queueNameDf;
|
|
|
}
|
|
|
MqEcs mqEcs = mqEcsService.getByHostName(SysConstants.hostName);
|
|
|
if(mqEcs != null && mqEcs.getIsScaling() == 0){ //设置为常驻
|
|
@@ -113,7 +106,7 @@ public class SysConstants implements ApplicationContextAware {
|
|
|
mqEcs.setUpdateTime(null);
|
|
|
mqEcsService.updateById(mqEcs);
|
|
|
}
|
|
|
- queueName = mqEcs.getQueueName();
|
|
|
+ return mqEcs.getQueueName();
|
|
|
}
|
|
|
|
|
|
@Override
|