bugfixes
This commit is contained in:
parent
a616bd2aad
commit
0ae267ac1d
|
@ -69,6 +69,7 @@ services:
|
||||||
mqtt.broker.uri: tcp://broker.hivemq.com:1883
|
mqtt.broker.uri: tcp://broker.hivemq.com:1883
|
||||||
discovery.endpoint.uri: https://tapas-auction-house.86-119-34-242.nip.io
|
discovery.endpoint.uri: https://tapas-auction-house.86-119-34-242.nip.io
|
||||||
auction.house.uri: https://tapas-auction-house.86-119-35-40.nip.io
|
auction.house.uri: https://tapas-auction-house.86-119-35-40.nip.io
|
||||||
|
tasks.list.uri: http://tapas-tasks.86-119-35-40.nip.io
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.tapas-auction-house.rule=Host(`tapas-auction-house.${PUB_IP}.nip.io`)"
|
- "traefik.http.routers.tapas-auction-house.rule=Host(`tapas-auction-house.${PUB_IP}.nip.io`)"
|
||||||
|
|
|
@ -101,6 +101,9 @@ public class WebSubSubscriber {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
System.out.println("HUB: " + hub);
|
||||||
|
System.out.println("TOPIC: " + topic);
|
||||||
|
|
||||||
HttpRequest request = HttpRequest.newBuilder()
|
HttpRequest request = HttpRequest.newBuilder()
|
||||||
.uri(hubURI)
|
.uri(hubURI)
|
||||||
.header("Content-Type", "application/x-www-form-urlencoded")
|
.header("Content-Type", "application/x-www-form-urlencoded")
|
||||||
|
|
|
@ -27,9 +27,11 @@ public class WinningBidWebController {
|
||||||
|
|
||||||
@PostMapping(path = "/taskwinner", consumes = TaskJsonRepresentation.MEDIA_TYPE)
|
@PostMapping(path = "/taskwinner", consumes = TaskJsonRepresentation.MEDIA_TYPE)
|
||||||
public ResponseEntity<String> winningBid(@RequestBody TaskJsonRepresentation payload){
|
public ResponseEntity<String> winningBid(@RequestBody TaskJsonRepresentation payload){
|
||||||
|
LOGGER.info("New Task Winner");
|
||||||
try {
|
try {
|
||||||
var body = payload.serialize();
|
var body = payload.serialize();
|
||||||
LOGGER.info(body);
|
LOGGER.info("Task Winner body: " + body);
|
||||||
|
LOGGER.info("Task Winner taskListURI: " + taskListURI);
|
||||||
var postURI = URI.create(taskListURI + "/tasks/");
|
var postURI = URI.create(taskListURI + "/tasks/");
|
||||||
HttpRequest postRequest = HttpRequest.newBuilder()
|
HttpRequest postRequest = HttpRequest.newBuilder()
|
||||||
.uri(postURI)
|
.uri(postURI)
|
||||||
|
@ -40,7 +42,7 @@ public class WinningBidWebController {
|
||||||
HttpClient client = HttpClient.newHttpClient();
|
HttpClient client = HttpClient.newHttpClient();
|
||||||
var postResponse = client.send(postRequest, HttpResponse.BodyHandlers.ofString());
|
var postResponse = client.send(postRequest, HttpResponse.BodyHandlers.ofString());
|
||||||
|
|
||||||
LOGGER.info(postResponse.statusCode());
|
LOGGER.info("Create task internally with status code: " + postResponse.statusCode());
|
||||||
|
|
||||||
|
|
||||||
HttpHeaders responseHeaders = new HttpHeaders();
|
HttpHeaders responseHeaders = new HttpHeaders();
|
||||||
|
|
|
@ -32,6 +32,7 @@ public class PublishAuctionStartedEventWebSubAdapter implements AuctionStartedEv
|
||||||
@Override
|
@Override
|
||||||
public void publishAuctionStartedEvent(AuctionStartedEvent event) {
|
public void publishAuctionStartedEvent(AuctionStartedEvent event) {
|
||||||
logger.info("AuctionHouse | Publish auction started over WebSub!");
|
logger.info("AuctionHouse | Publish auction started over WebSub!");
|
||||||
|
logger.info("AuctionHouse | AuctionHouseURI: " + auctionHouseUri + " WebSubHubUri: " + webSubHubUri);
|
||||||
|
|
||||||
HttpClient client = HttpClient.newHttpClient();
|
HttpClient client = HttpClient.newHttpClient();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user