Skip to content

Commit

Permalink
[FIX] log
Browse files Browse the repository at this point in the history
  • Loading branch information
ssjy4974 committed Jan 26, 2024
1 parent 4886399 commit c9e2b30
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ public Mono<Void> subscribeStartTrigger() {
.flatMap(
chatPayload -> {
Object data = chatPayload.getData();
if (data instanceof String) {
scheduler.startJob((String) data);
}
scheduler.startJob((String) data);
return chatWebSocketHandler.sendMessage(
chatPayload); // send message and return its Mono
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public void init() {
}

public Mono<Long> publishChatMessage(String message) {
log.info("여기 publishChatMessage {}", message);
return Mono.just(hostName)
.map(
host -> {
Expand All @@ -57,7 +58,9 @@ public Mono<Long> publishChatMessage(String message) {
result -> {
try {
ChatPayload chatPayload = objectMapper.readValue(result, ChatPayload.class);
log.info("여기 push쪽 command : {}", chatPayload.getCommand());
if (chatPayload.getCommand().equals(ChatCommand.START)) {
log.info("들어옴");
return reactiveStringRedisTemplate
.convertAndSend(START_TOPIC, result)
.doOnSuccess(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ public Mono<Sinks.EmitResult> sendMessage(ChatPayload chatMessage) {
return Mono.fromSupplier(() -> chatMessageSink.tryEmitNext(chatMessage))
.doOnSuccess(
emitResult -> {
if (emitResult.isFailure()) {
}
if (emitResult.isFailure()) {}
});
}

Expand All @@ -90,7 +89,6 @@ public Mono<Void> broadCast(ChatPayload chatPayload) {
}

public Mono<Void> broadCastStart(ChatPayload payload) {
log.info("start payload : {}", payload.getData());
return objectStringConverter
.objectToString(payload)
.flatMap(redisChatMessagePublisher::publishChatMessage)
Expand Down

0 comments on commit c9e2b30

Please sign in to comment.