Sfoglia il codice sorgente

0.0.52
微调dependency

menglu 2 anni fa
parent
commit
bd2bfe90e9

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

@@ -220,7 +220,7 @@
 		<dependency>
 			<groupId>com.persagy</groupId>
 			<artifactId>sailfish</artifactId>
-			<version>0.0.50</version>
+			<version>0.0.52</version>
 		</dependency>
 	</dependencies>
 

+ 26 - 3
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/service/RefreshThread.java

@@ -6,6 +6,8 @@ import javax.annotation.PostConstruct;
 
 import org.springframework.stereotype.Component;
 
+import com.alibaba.fastjson.JSONObject;
+import com.persagy.ibms.core.data.SceneDataObject;
 import com.persagy.ibms.core.util.LogOfRun;
 import com.persagy.ibms.core.util.LogUtil;
 import com.persagy.ibms.data.sdk.util.Constant;
@@ -18,6 +20,7 @@ import lombok.extern.slf4j.Slf4j;
 
 @Slf4j
 @Component
+@SuppressWarnings("unused")
 public class RefreshThread extends Thread {
 	@PostConstruct
 	public void init() {
@@ -48,7 +51,8 @@ public class RefreshThread extends Thread {
 			}
 		}
 
-		Date lastPrintComputeQueueTime = new Date();
+		Date lastPrintComputeQueueTime = null;
+		JSONObject last_createInfo = null;
 		while (!stop) {
 			try {
 				Thread.sleep(1000L);
@@ -57,9 +61,28 @@ public class RefreshThread extends Thread {
 			}
 
 			Date currTime = new Date();
-			if (currTime.getTime() / (1000L * 60) > lastPrintComputeQueueTime.getTime() / (1000L * 60)) {
-				log.warn("WaitCompute size: " + RepositoryContainer.instance.WaitCompute.size());
+			if (lastPrintComputeQueueTime == null || currTime.getTime() / (1000L * 60) > lastPrintComputeQueueTime.getTime() / (1000L * 60)) {
+				JSONObject createInfo = SceneDataObject.createInfo();
+
+				// log.warn("WaitCompute size: " + RepositoryContainer.instance.WaitCompute.size()
+				// + RepositoryContainer.instance.dependency.membership_size() + "\t"
+				// + RepositoryContainer.instance.dependency.dependency_size());
+				//
+				// String[] keys = createInfo.keySet().toArray(new String[0]);
+				// Arrays.sort(keys);
+				// for (String key : keys) {
+				// long value = createInfo.getLong(key);
+				// long value_last = 0L;
+				// if (last_createInfo != null && last_createInfo.containsKey(key)) {
+				// value_last = (Long) last_createInfo.get(key);
+				// }
+				// if (value > value_last) {
+				// log.warn(key + "\t" + (value - value_last));
+				// }
+				// }
+
 				lastPrintComputeQueueTime = currTime;
+				last_createInfo = createInfo;
 			}
 
 			boolean changed_config = false;