Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
96b0e82113
|
@ -95,6 +95,9 @@ services:
|
||||||
- roster
|
- roster
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/data/
|
- ./:/data/
|
||||||
|
environment:
|
||||||
|
- executor_pool_uri: "executor-pool.86-119-35-40.nip.io"
|
||||||
|
- roster_uri: "roster.86-119-35-40.nip.io"
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.executor-computation.rule=Host(`executor-computation.${PUB_IP}.nip.io`)"
|
- "traefik.http.routers.executor-computation.rule=Host(`executor-computation.${PUB_IP}.nip.io`)"
|
||||||
|
@ -103,7 +106,6 @@ services:
|
||||||
- "traefik.http.routers.executor-computation.tls=true"
|
- "traefik.http.routers.executor-computation.tls=true"
|
||||||
- "traefik.http.routers.executor-computation.entryPoints=web,websecure"
|
- "traefik.http.routers.executor-computation.entryPoints=web,websecure"
|
||||||
- "traefik.http.routers.executor-computation.tls.certresolver=le"
|
- "traefik.http.routers.executor-computation.tls.certresolver=le"
|
||||||
|
|
||||||
executor-robot:
|
executor-robot:
|
||||||
image: openjdk
|
image: openjdk
|
||||||
command: "java -jar /data/executor-robot-0.0.1-SNAPSHOT.jar"
|
command: "java -jar /data/executor-robot-0.0.1-SNAPSHOT.jar"
|
||||||
|
@ -113,6 +115,9 @@ services:
|
||||||
- roster
|
- roster
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/data/
|
- ./:/data/
|
||||||
|
environment:
|
||||||
|
- executor_pool_uri: "executor-pool.86-119-35-40.nip.io"
|
||||||
|
- roster_uri: "roster.86-119-35-40.nip.io"
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.executor-robot.rule=Host(`executor-robot.${PUB_IP}.nip.io`)"
|
- "traefik.http.routers.executor-robot.rule=Host(`executor-robot.${PUB_IP}.nip.io`)"
|
||||||
|
|
|
@ -9,16 +9,15 @@ import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
|
|
||||||
import ch.unisg.executorbase.executor.application.port.out.ExecutionFinishedEventPort;
|
import ch.unisg.executorbase.executor.application.port.out.ExecutionFinishedEventPort;
|
||||||
import ch.unisg.executorbase.executor.domain.ExecutionFinishedEvent;
|
import ch.unisg.executorbase.executor.domain.ExecutionFinishedEvent;
|
||||||
|
|
||||||
public class ExecutionFinishedEventAdapter implements ExecutionFinishedEventPort {
|
public class ExecutionFinishedEventAdapter implements ExecutionFinishedEventPort {
|
||||||
|
|
||||||
// TODO url doesn't get mapped bc no autowiring
|
String server = System.getenv("roster_uri") == null ?
|
||||||
@Value("${roster.url}")
|
"http://localhost:8082" : System.getenv("roster_uri");
|
||||||
String server = "http://localhost:8082";
|
|
||||||
|
|
||||||
Logger logger = Logger.getLogger(ExecutionFinishedEventAdapter.class.getName());
|
Logger logger = Logger.getLogger(ExecutionFinishedEventAdapter.class.getName());
|
||||||
|
|
||||||
|
|
|
@ -23,9 +23,8 @@ import org.json.JSONObject;
|
||||||
@Primary
|
@Primary
|
||||||
public class GetAssignmentAdapter implements GetAssignmentPort {
|
public class GetAssignmentAdapter implements GetAssignmentPort {
|
||||||
|
|
||||||
// TODO Not working for now bc it doesn't get autowired
|
String server = System.getenv("roster_uri") == null ?
|
||||||
@Value("${roster.url}")
|
"http://localhost:8082" : System.getenv("roster_uri");
|
||||||
String server = "http://127.0.0.1:8082";
|
|
||||||
|
|
||||||
Logger logger = Logger.getLogger(GetAssignmentAdapter.class.getName());
|
Logger logger = Logger.getLogger(GetAssignmentAdapter.class.getName());
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,8 @@ import ch.unisg.executorbase.executor.domain.ExecutorType;
|
||||||
@Primary
|
@Primary
|
||||||
public class NotifyExecutorPoolAdapter implements NotifyExecutorPoolPort {
|
public class NotifyExecutorPoolAdapter implements NotifyExecutorPoolPort {
|
||||||
|
|
||||||
// TODO Not working for now bc it doesn't get autowired
|
String server = System.getenv("executor_pool_uri") == null ?
|
||||||
@Value("${executor.pool.url}")
|
"http://localhost:8083" : System.getenv("executor_pool_uri");
|
||||||
String server = "http://127.0.0.1:8083";
|
|
||||||
|
|
||||||
Logger logger = Logger.getLogger(NotifyExecutorPoolAdapter.class.getName());
|
Logger logger = Logger.getLogger(NotifyExecutorPoolAdapter.class.getName());
|
||||||
|
|
||||||
|
@ -35,6 +34,8 @@ public class NotifyExecutorPoolAdapter implements NotifyExecutorPoolPort {
|
||||||
@Override
|
@Override
|
||||||
public boolean notifyExecutorPool(ExecutorURI executorURI, ExecutorType executorType) {
|
public boolean notifyExecutorPool(ExecutorURI executorURI, ExecutorType executorType) {
|
||||||
|
|
||||||
|
System.out.println(server);
|
||||||
|
|
||||||
String body = new JSONObject()
|
String body = new JSONObject()
|
||||||
.put("executorTaskType", executorType)
|
.put("executorTaskType", executorType)
|
||||||
.put("executorUri", executorURI.getValue())
|
.put("executorUri", executorURI.getValue())
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.paho</groupId>
|
<groupId>org.eclipse.paho</groupId>
|
||||||
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
|
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
|
||||||
<version>1.2.0</version>
|
<version>1.2.5</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.transaction</groupId>
|
<groupId>javax.transaction</groupId>
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.paho</groupId>
|
<groupId>org.eclipse.paho</groupId>
|
||||||
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
|
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
|
||||||
<version>1.2.0</version>
|
<version>1.2.5</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user