Deployment 0.0.1 #25

Merged
Maece97 merged 34 commits from dev into main 2021-10-17 13:49:10 +00:00
Showing only changes of commit 39191afc2c - Show all commits

View File

@ -5,6 +5,8 @@ import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.json.JSONObject;
import org.springframework.context.annotation.Primary;
@ -19,6 +21,8 @@ public class PublishTaskAssignedEventAdapter implements TaskAssignedEventPort {
String server = "http://127.0.0.1:8085";
Logger logger = Logger.getLogger(PublishTaskAssignedEventAdapter.class.getName());
@Override
public void publishTaskAssignedEvent(TaskAssignedEvent event) {
@ -37,7 +41,7 @@ public class PublishTaskAssignedEventAdapter implements TaskAssignedEventPort {
try {
client.send(request, HttpResponse.BodyHandlers.ofString());
} catch (IOException | InterruptedException e) {
e.printStackTrace();
logger.log(Level.SEVERE, e.getLocalizedMessage(), e);
// Restore interrupted state...
Thread.currentThread().interrupt();
}