Browse Source

0.0.9
增加检查quote,修改没成功就连iot的bug

menglu 3 years ago
parent
commit
1dd25b26b9

+ 2 - 2
ibms-data-sdk/pom.xml

@@ -2,7 +2,7 @@
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>com.persagy</groupId>
 	<artifactId>ibms-data-sdk</artifactId>
-	<version>0.0.8</version>
+	<version>0.0.9</version>
 
 	<repositories>
 		<repository>
@@ -214,7 +214,7 @@
 		<dependency>
 			<groupId>com.persagy</groupId>
 			<artifactId>sailfish</artifactId>
-			<version>0.0.40</version>
+			<version>0.0.41</version>
 		</dependency>
 	</dependencies>
 

+ 31 - 31
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/service/DaemonThread.java

@@ -179,39 +179,39 @@ public class DaemonThread extends Thread {
 			}
 			LogOfRun.endTime = new Date();
 
-			try {
-				if (Constant.iot_websocket_url != null) {
-					log.warn("iot-websocket");
-					IOTWebSocketClient.client = new IOTWebSocketClient(new URI(Constant.iot_websocket_url + "?projectId="
-							+ RepositoryContainer.RepositoryProject.projectId.substring(2) + "&type=iot,text,pointset"));
-					IOTWebSocketClient.client.connect();
-					// while (!myClient.getReadyState().equals(READYSTATE.OPEN)) {
-					// Thread.sleep(1000L);
-					// log.info("连接中···请稍后");
-					// }
-					// log.info("连接成功");
-					Thread.sleep(1000L);
-				}
-				if (Constant.alarm_enable) {
-					log.warn("alarm-websocket");
-					AlarmWebSocketClient.client = new AlarmWebSocketClient(
-							new URI(Constant.alarm_websocket_url + "/" + RepositoryContainer.RepositoryProject.projectId));
-					AlarmWebSocketClient.client.connect();
-					// while (!myClient.getReadyState().equals(READYSTATE.OPEN)) {
-					// Thread.sleep(1000L);
-					// log.info("连接中···请稍后");
-					// }
-					// log.info("连接成功");
-					Thread.sleep(1000L);
+			if (RepositoryContainer.RepositoryProject.compute_finish) {
+				try {
+					if (Constant.iot_websocket_url != null) {
+						log.warn("iot-websocket");
+						IOTWebSocketClient.client = new IOTWebSocketClient(new URI(Constant.iot_websocket_url + "?projectId="
+								+ RepositoryContainer.RepositoryProject.projectId.substring(2) + "&type=iot,text,pointset"));
+						IOTWebSocketClient.client.connect();
+						// while (!myClient.getReadyState().equals(READYSTATE.OPEN)) {
+						// Thread.sleep(1000L);
+						// log.info("连接中···请稍后");
+						// }
+						// log.info("连接成功");
+						Thread.sleep(1000L);
+					}
+					if (Constant.alarm_enable) {
+						log.warn("alarm-websocket");
+						AlarmWebSocketClient.client = new AlarmWebSocketClient(
+								new URI(Constant.alarm_websocket_url + "/" + RepositoryContainer.RepositoryProject.projectId));
+						AlarmWebSocketClient.client.connect();
+						// while (!myClient.getReadyState().equals(READYSTATE.OPEN)) {
+						// Thread.sleep(1000L);
+						// log.info("连接中···请稍后");
+						// }
+						// log.info("连接成功");
+						Thread.sleep(1000L);
+					}
+				} catch (Exception e) {
+					String message = LogUtil.GetExceptionStackTrace(e);
+					log.error(e.getMessage(), e);
+					LogOfRun.error(null, message);
+					LogOfRun.status = "failure";
 				}
-			} catch (Exception e) {
-				String message = LogUtil.GetExceptionStackTrace(e);
-				log.error(e.getMessage(), e);
-				LogOfRun.error(null, message);
-				LogOfRun.status = "failure";
-			}
 
-			if (RepositoryContainer.RepositoryProject.compute_finish) {
 				break;
 			}
 		}