Skip to content

Commit

Permalink
change the function name to be less confusing
Browse files Browse the repository at this point in the history
  • Loading branch information
ZihengSun committed Jan 20, 2024
1 parent dea6759 commit 5cf3271
Showing 1 changed file with 9 additions and 24 deletions.
33 changes: 9 additions & 24 deletions src/main/java/com/gw/tasks/GeoweaverProcessTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -250,21 +250,9 @@ public void stopMonitor() {

//no closing anymore, the websocket session between client and server should be always active
this.monitor = null;

this.workflow_monitor = null;

// try {
//
// logger.info("close the websocket session from server side");
//
//// if(!BaseTool.isNull(monitor))
//// monitor.close();
//
// } catch (IOException e) {
//
// e.printStackTrace();
//
// }

}

@Override
Expand All @@ -277,8 +265,6 @@ public void initialize() {
public void execute() {

logger.debug(" + + + start Geoweaver Process " + pid );

System.out.println("> Start to run process: "+ pid);

try {

Expand All @@ -297,8 +283,6 @@ public void execute() {
et.executeProcess(history_id, pid, host, pswd, token, isjoin, bin, pyenv, basedir);

this.curstatus = ExecutionStatus.DONE;

this.updateEverything();

}catch(Exception e) {

Expand All @@ -307,9 +291,10 @@ public void execute() {
this.curstatus = ExecutionStatus.FAILED;

this.history_output = e.getLocalizedMessage();


}finally {

this.updateEverything();

if(!isjoin) this.stopMonitor(); //if run solo, close. if workflow, don't.

Expand All @@ -328,7 +313,7 @@ public void execute() {
* @param history_id
* @param flag
*/
public void sendAllTaskStatus(){
public void sendWorkflowTaskStatus(){

try {

Expand Down Expand Up @@ -364,10 +349,10 @@ public void sendAllTaskStatus(){
|| ExecutionStatus.READY.equals(c_his.getIndicator())
|| ExecutionStatus.RUNNING.equals(c_his.getIndicator())){

workflow_status = ExecutionStatus.RUNNING;
}else if(ExecutionStatus.FAILED.equals(c_his.getIndicator())){
errorcheck = 1;
}
workflow_status = ExecutionStatus.RUNNING;
}else if(ExecutionStatus.FAILED.equals(c_his.getIndicator())){
errorcheck = 1;
}

array.add(obj);

Expand Down Expand Up @@ -485,7 +470,7 @@ public void updateEverything(){
refreshWorkflowMonitor();

// this.sendSingleTaskStatus(workflow_pid, history_id, this.curstatus);
this.sendAllTaskStatus();
this.sendWorkflowTaskStatus();

}

Expand Down

0 comments on commit 5cf3271

Please sign in to comment.