deployment script & tasklist & executor fixes

This commit is contained in:
2021-11-17 19:54:04 +01:00
parent 6b8f5bf013
commit 9d75a87dd6
6 changed files with 18 additions and 11 deletions

View File

@@ -34,8 +34,6 @@ public class NotifyExecutorPoolAdapter implements NotifyExecutorPoolPort {
@Override
public boolean notifyExecutorPool(ExecutorURI executorURI, ExecutorType executorType) {
System.out.println(server);
String body = new JSONObject()
.put("executorTaskType", executorType)
.put("executorUri", executorURI.getValue())

View File

@@ -1,5 +1,6 @@
package ch.unisg.executorbase.executor.domain;
import java.util.logging.Level;
import java.util.logging.Logger;
import ch.unisg.common.valueobject.ExecutorURI;
@@ -41,8 +42,10 @@ public abstract class ExecutorBase {
// TODO do this in main
// Notify executor-pool about existence. If executor-pools response is successfull start with getting an assignment, else shut down executor.
if(!notifyExecutorPoolService.notifyExecutorPool(this.executorURI, this.executorType)) {
logger.log(Level.WARNING, "Executor could not connect to executor pool! Shuting down!");
System.exit(0);
} else {
logger.info("Executor conntected to executor pool");
this.status = ExecutorStatus.IDLING;
getAssignment();
}