Skip to content
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

Merged
merged 3 commits into from
Jun 10, 2024

Conversation

CzajaLukasz
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented Jun 10, 2024

Test Results

8 tests   8 ✅  26s ⏱️
4 suites  0 💤
4 files    0 ❌

Results for commit a752874.

♻️ This comment has been updated with latest results.

@CzajaLukasz CzajaLukasz changed the title RSWW-135 transport get data from data generator RSWW-136 transport get data from data generator Jun 10, 2024
Copy link
Member

@Danzigerrr Danzigerrr left a 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ć?

Copy link
Contributor

@pcichowski pcichowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

czemu te dwa eventy się różnią?
image

@RabbitListener(queues = "#{handleDataGeneratorCreateQueue}")
public void consumeDataGeneratorMessage(String requestJson) {
Logger logger = Logger.getLogger("TransportController");
logger.info("Got transport data generator: " + requestJson);
Copy link
Contributor

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

Comment on lines 208 to 209
@RabbitListener(queues = "#{handleDataGeneratorCreateQueue}")
public void consumeDataGeneratorMessage(String requestJson) {
Copy link
Contributor

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,
Copy link
Contributor

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));
    }

Copy link
Contributor

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ć

Copy link
Contributor

@pcichowski pcichowski left a 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

Copy link
Contributor

@pcichowski pcichowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

G

@CzajaLukasz CzajaLukasz merged commit a99a6d9 into dev Jun 10, 2024
3 checks passed
@CzajaLukasz CzajaLukasz deleted the RSWW-135-transport-get-data-from-datagenerator branch June 10, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants