1、修改推送的bug
This commit is contained in:
parent
9f4f5ad5c9
commit
6fe9c14d67
@ -62,16 +62,6 @@ public class GXXfzForwarder extends Forwarder{
|
|||||||
int sendNum = 0;
|
int sendNum = 0;
|
||||||
if(records.size() == 0) return 0;
|
if(records.size() == 0) return 0;
|
||||||
|
|
||||||
if(!xfzTcpClient.isActive()) {
|
|
||||||
xfzTcpClient.connect();
|
|
||||||
try {
|
|
||||||
Thread.sleep(5000);
|
|
||||||
}
|
|
||||||
catch (Exception e){
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
XFZData xfzTcpMessage = new XFZData();
|
XFZData xfzTcpMessage = new XFZData();
|
||||||
xfzTcpMessage.setProjectID(projectId);
|
xfzTcpMessage.setProjectID(projectId);
|
||||||
xfzTcpMessage.setWorkPointID(projectId);
|
xfzTcpMessage.setWorkPointID(projectId);
|
||||||
@ -95,6 +85,15 @@ public class GXXfzForwarder extends Forwarder{
|
|||||||
String json = GsonUtil.toJson(xfzTcpMessage);
|
String json = GsonUtil.toJson(xfzTcpMessage);
|
||||||
logger.info("project " + projectId + ": push calculation result to XFZ");
|
logger.info("project " + projectId + ": push calculation result to XFZ");
|
||||||
logger.info(json);
|
logger.info(json);
|
||||||
|
if(!xfzTcpClient.isActive()) {
|
||||||
|
xfzTcpClient.connect();
|
||||||
|
try {
|
||||||
|
Thread.sleep(5000);
|
||||||
|
}
|
||||||
|
catch (Exception e){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
if(xfzTcpClient.isActive()) {
|
if(xfzTcpClient.isActive()) {
|
||||||
xfzTcpClient.writeAndFlush(json);
|
xfzTcpClient.writeAndFlush(json);
|
||||||
return sendNum;
|
return sendNum;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user