Skip to content

Commit

Permalink
Merge pull request #149 from ngbdf/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ReasonDuan authored Jan 8, 2021
2 parents 55d4820 + 1724fa5 commit 9dccdce
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private Map<String, List<ExcelData>> getSheetBodyData(Map<String, ReportData> re
}
ExcelData excelData = new ExcelData();
excelData.setStartColumn(0);
List<List<String>> orderSheet = sheetData.stream().sorted((o1, o2) -> Integer.parseInt(o2.get(2))-Integer.parseInt(o1.get(2))).collect(Collectors.toList());
List<List<String>> orderSheet = sheetData.stream().sorted((o1, o2) -> Integer.parseInt(o2.get(1))-Integer.parseInt(o1.get(1))).collect(Collectors.toList());
excelData.setTableData(orderSheet);
List<ExcelData> excelListData = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ public AnalyzerStatusThread(RdbAnalyzeService rdbAnalyzeService, RestTemplate re
@Override
public void run() {
JSONObject res = rdbAnalyzeService.assignAnalyzeJob(rdbAnalyze);

if(res.containsKey("status") && !res.getBoolean("status")){
Long scheduleID = res.getLongValue("scheduleID");
if(!res.getBoolean("status")){
LOG.warn("Assign job fail.");
// 执行失败,删除任务
AppCache.scheduleDetailMap.remove(rdbAnalyze.getId());
if(scheduleID != 0L){
rdbAnalyzeService.deleteResult(rdbAnalyze, scheduleID);
}
return;
}
this.analyzeInstances = (List<AnalyzeInstance>)res.get("needAnalyzeInstances");
if(analyzeInstances == null || analyzeInstances.isEmpty()){
LOG.warn("Analyze instances is empty.");
return;
}
Long scheduleID = res.containsKey("scheduleID") ? res.getLongValue("scheduleID") : 0L;
scheduleDetails = AppCache.scheduleDetailMap.get(rdbAnalyze.getId());
// 获取所有analyzer运行状态
while (AppCache.isNeedAnalyzeStastus(rdbAnalyze.getId())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public JSONObject allocationRDBAnalyzeJob(RDBAnalyze rdbAnalyze) {
// 执行RCT任务分发
public JSONObject assignAnalyzeJob(RDBAnalyze rdbAnalyze){
JSONObject responseResult = new JSONObject();
responseResult.put("status", Boolean.TRUE);
int[] analyzer = null;
if (rdbAnalyze.getAnalyzer().contains(",")) {
String[] str = rdbAnalyze.getAnalyzer().split(",");
Expand Down
Binary file modified redis-manager-dashboard/template/RCT_Report_Template.xlsx
Binary file not shown.

0 comments on commit 9dccdce

Please sign in to comment.