Skip to content

Commit

Permalink
Merge branch 'develop-2.0.0' of https://github.com/FederatedAI/FATE-B…
Browse files Browse the repository at this point in the history
…oard into develop-2.0.0
  • Loading branch information
idwenwen committed Nov 21, 2023
2 parents 2240b54 + 31148d9 commit bb19f72
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
2 changes: 2 additions & 0 deletions src/main/java/org/fedai/fate/board/pojo/PagedJobQO.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
@EqualsAndHashCode
@ToString
public class PagedJobQO implements Serializable {
@JsonProperty("job_id")
private String jobId;
@JsonProperty("partyId")
private String partyId;
private Long pageNum = 1L;
private Long pageSize = 10L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,9 @@ public class JobManagerService {
public List<JobDO> queryJobStatus() {
Map<String, Object> param = new HashMap<>();
List<String> statusList = new ArrayList<>();
// statusList.add(Dict.STATUS_JOB_WAITING);
statusList.add(Dict.STATUS_JOB_WAITING);
statusList.add(Dict.STATUS_JOB_RUNNING);

String statusStr = String.join(",", statusList);
param.put("status", statusStr);

param.put("status", statusList);
Map<String, Object> jobMap = getJobMap(param);
if (jobMap != null) {
return (List<JobDO>) jobMap.get("list");
Expand Down Expand Up @@ -184,11 +181,11 @@ public PageBean<Map<String, Object>> queryPagedJobs(PagedJobQO pagedJobQO) {
}

if (pagedJobQO.getRole() != null && pagedJobQO.getRole().size() > 0) {
reqMap.put(Dict.ROLE, String.join(",",pagedJobQO.getRole()));
reqMap.put(Dict.ROLE, pagedJobQO.getRole());

}
if (pagedJobQO.getStatus() != null && pagedJobQO.getStatus().size() > 0) {
reqMap.put(Dict.STATUS, String.join(",",pagedJobQO.getStatus()));
reqMap.put(Dict.STATUS, pagedJobQO.getStatus());
}

if (org.apache.commons.lang3.StringUtils.isNotBlank(pagedJobQO.getOrderField())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,21 +132,25 @@ public void run() {
throw new IllegalArgumentException("summary parameter error");
}

if (pushStatus) {
JSONObject dependency = (JSONObject) flushToWebData.get(Dict.DEPENDENCY_DATA);
dependency.remove("component_module");
dependency.remove("component_need_run");
dependency.remove("dependencies");
Map<String, Object> summary = (Map<String, Object>) flushToWebData.get(Dict.SUMMARY_DATA);
summary.remove("dataset");
}
// if (pushStatus) {
// JSONObject dependency = (JSONObject) flushToWebData.get(Dict.DEPENDENCY_DATA);
// dependency.remove("component_module");
// dependency.remove("component_need_run");
// dependency.remove("dependencies");
// Map<String, Object> summary = (Map<String, Object>) flushToWebData.get(Dict.SUMMARY_DATA);
// summary.remove("dataset");
// }
//
if (session.isOpen()) {
session.getBasicRemote().sendText(JSON.toJSONString(flushToWebData));
logger.warn("session:{}, data to push:{}", session, JSON.toJSONString(flushToWebData));
pushStatus = true;
if (Dict.JOB_FINISHED_STATUS.contains(status)) {
session.close();
break;



}
Thread.sleep(500);
} else {
Expand Down

0 comments on commit bb19f72

Please sign in to comment.