fix commit
This commit is contained in:
@@ -7,7 +7,6 @@ import jakarta.ws.rs.GET;
|
||||
import jakarta.ws.rs.POST;
|
||||
import jakarta.ws.rs.Path;
|
||||
import jakarta.ws.rs.QueryParam;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.eclipse.microprofile.rest.client.inject.RestClient;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@@ -3,9 +3,7 @@ package de.infinimotion.backend.task;
|
||||
import de.infinimotion.model.backend.*;
|
||||
import io.quarkus.scheduler.Scheduled;
|
||||
import jakarta.enterprise.context.ApplicationScoped;
|
||||
import jakarta.enterprise.inject.Instance;
|
||||
import jakarta.inject.Inject;
|
||||
import jakarta.ws.rs.core.Request;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
@@ -26,7 +24,6 @@ public class ShowPlanner {
|
||||
CommandWrapper requestShows = new CommandListVorstellung().serialize().tx(requestPlans);
|
||||
List<Vorstellung> shows = CommandListVorstellungResponse.deserialize(requester.request(requestShows)).getList();
|
||||
|
||||
boolean changed = false;
|
||||
LocalDate todayPlus14 = LocalDate.now().plusDays(14);
|
||||
for (Plan plan : plans) {
|
||||
if (plan.getFirst().isAfter(todayPlus14)) continue;
|
||||
@@ -50,15 +47,11 @@ public class ShowPlanner {
|
||||
requestNewShow.setVorstellung(show);
|
||||
Vorstellung newShow = CommandCreateVorstellungResponse.deserialize(requester.request(requestNewShow.serialize().tx(requestPlans))).getVorstellung();
|
||||
System.out.println("Creating show: " + newShow);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
CommandWrapper commit = new CommandListVorstellung().serialize().tx(requestPlans).commit();
|
||||
CommandListVorstellungResponse.deserialize(requester.request(commit));
|
||||
System.out.println("Committed");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user