-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RSWW-136 transport get data from data generator #64
RSWW-136 transport get data from data generator #64
Conversation
Test Results8 tests 8 ✅ 26s ⏱️ Results for commit a752874. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CzajaLukasz Mam wrażenie, że eventy tworzenia transportów nie są zapisywane. Liczba wierszy w tabeli się nie zwiększa. Uzywam zapytania SELECT * FROM TRANSPORT_CREATED_EVENT;
(dla int numberOfDays = 1;
dnia w bootstrapie są 254 wiersze).
Edit: Może ja coś źle debuje, ale widziałem że pojawią się kolejne eventy dla TRANSPORT_UPDATE_EVENT podczas update'u, a nie ma nowych eventów podczas tworzenia. NWM może tak powinno być?
...rc/main/java/org/microarchitecturovisco/transport/controllers/TransportsQueryController.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/microarchitecturovisco/transport/controllers/TransportsQueryController.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/microarchitecturovisco/transport/controllers/TransportsQueryController.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RabbitListener(queues = "#{handleDataGeneratorCreateQueue}") | ||
public void consumeDataGeneratorMessage(String requestJson) { | ||
Logger logger = Logger.getLogger("TransportController"); | ||
logger.info("Got transport data generator: " + requestJson); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
przekopiowane z hoteli bez patrzenia, tam jeszcze na to pozwoliłem ale ten frazes moim zdaniem do zmiany
@RabbitListener(queues = "#{handleDataGeneratorCreateQueue}") | ||
public void consumeDataGeneratorMessage(String requestJson) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plik nazywa się TransportQueryController więc nie powinno tu być logiki tworzenia ani aktualizacji
transportEventSourcingHandler.project(List.of(transportUpdateEvent)); | ||
} | ||
|
||
public void createTransport(UUID transportId, UUID courseId, LocalDateTime departureDate, int capacity, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ta funkcja istniała wcześniej w TransportCommandService
(w ogóle nie powinno być takiej logiki w QueryService
)
public void createTransport(CreateTransportCommand command) {
TransportCreatedEvent transportCreatedEvent = new TransportCreatedEvent(
command.getUuid(), command.getCommandTimeStamp(), command.getTransportDto()
);
transportEventStore.save(transportCreatedEvent);
eventSourcingHandler.project(List.of(transportCreatedEvent));
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i albo korzystamy z TransportCreatedEvent
albo z TransportOnlyCreated
, trzeba wybrać
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logika wygląda że działa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
G
No description provided.