Browse Source

Merge pull request #819 in BA/design from ~PLOUGH/design:release to release

* commit '935b4fcca69eb3f0e5d792fccc596e45b1f23f03':
  无JIRA任务;去掉调试信息
master
superman 8 years ago
parent
commit
29e3a29168
  1. 14
      designer_base/src/com/fr/design/mainframe/templateinfo/TemplateInfoCollector.java

14
designer_base/src/com/fr/design/mainframe/templateinfo/TemplateInfoCollector.java

@ -73,8 +73,6 @@ public class TemplateInfoCollector<T extends IOFile> implements Serializable {
} catch (InvalidClassException ex) { } catch (InvalidClassException ex) {
// 如果 TemplateInfoCollecor 类结构有改动,则放弃之前收集的数据(下次保存时覆盖) // 如果 TemplateInfoCollecor 类结构有改动,则放弃之前收集的数据(下次保存时覆盖)
// 这种情况主要在开发、测试过程中遇到,正式上线后不应该出现 // 这种情况主要在开发、测试过程中遇到,正式上线后不应该出现
FRLogger.getLogger().info(ex.getMessage());
FRLogger.getLogger().info("use a new instance");
instance = new TemplateInfoCollector(); instance = new TemplateInfoCollector();
} }
catch (Exception ex) { catch (Exception ex) {
@ -123,14 +121,6 @@ public class TemplateInfoCollector<T extends IOFile> implements Serializable {
private void saveInfo() { private void saveInfo() {
try { try {
ObjectOutputStream os = new ObjectOutputStream(new FileOutputStream(getInfoFile())); ObjectOutputStream os = new ObjectOutputStream(new FileOutputStream(getInfoFile()));
String log = "";
int count = 1;
for (String key : templateInfoList.keySet()) {
String createTime = ((HashMap)templateInfoList.get(key).get("consumingMap")).get("create_time").toString();
log += (count + ". id: " + key + " " + createTime + "\n" + templateInfoList.get(key).toString() + "\n");
count ++;
}
FRLogger.getLogger().info("writing tplInfo: \n" + log);
os.writeObject(instance); os.writeObject(instance);
os.close(); os.close();
} catch (Exception ex) { } catch (Exception ex) {
@ -241,10 +231,7 @@ public class TemplateInfoCollector<T extends IOFile> implements Serializable {
String jsonProcessMap = templateInfo.get("jsonProcessMap"); String jsonProcessMap = templateInfo.get("jsonProcessMap");
if (sendSingleTemplateInfo(consumingUrl, jsonConsumingMap) && sendSingleTemplateInfo(processUrl, jsonProcessMap)) { if (sendSingleTemplateInfo(consumingUrl, jsonConsumingMap) && sendSingleTemplateInfo(processUrl, jsonProcessMap)) {
// 清空记录 // 清空记录
FRLogger.getLogger().info("successfully send " + templateInfo.get("templateID"));
removeFromTemplateInfoList(templateInfo.get("templateID")); removeFromTemplateInfoList(templateInfo.get("templateID"));
} else {
FRLogger.getLogger().info("send template info failed, will try next time, " + templateInfo.get("templateID"));
} }
} }
saveInfo(); saveInfo();
@ -303,7 +290,6 @@ public class TemplateInfoCollector<T extends IOFile> implements Serializable {
private void removeFromTemplateInfoList(String key) { private void removeFromTemplateInfoList(String key) {
templateInfoList.remove(key); templateInfoList.remove(key);
FRLogger.getLogger().info(key + " is removed...");
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")

Loading…
Cancel
Save