Skip to content

Commit

Permalink
Merge pull request #100 from catchroom/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
sungjiwoon authored Feb 1, 2024
2 parents f86cbf8 + 50f75f6 commit 2501c16
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 57 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ jobs:
username: ${{ secrets.USER_NAME }}
key: ${{ secrets.PRIVATE_KEY }}
script: |
sudo docker image prune -af
sudo docker pull ${{ secrets.DOCKER_IMAGE_NAME }}
sudo docker stop chat-server
sudo docker run -d --rm --name chat-server -p 8080:8080 ${{ secrets.DOCKER_IMAGE_NAME }}
sudo docker stop chat-server1
sudo docker run -d --rm --name chat-server-1 -p 8080:8080 ${{ secrets.DOCKER_IMAGE_NAME }}
sleep 30
sudo docker stop chat-server2
sudo docker run -d --rm --name chat-server-2 -p 8081:8081 ${{ secrets.DOCKER_IMAGE_NAME }}
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
import com.catchroom.chat.message.dto.ChatMessageDto;
import com.catchroom.chat.message.type.UserIdentity;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

import lombok.*;

@Builder
@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor
@NoArgsConstructor
public class ChatRoomListGetResponse implements Serializable {
private String chatRoomNumber;

Expand Down
25 changes: 0 additions & 25 deletions src/main/java/com/catchroom/chat/chatroom/entity/ChatRoom.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,27 @@
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import jakarta.annotation.Resource;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.core.HashOperations;
import org.springframework.data.redis.core.ListOperations;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

/** redis ์™€ ๊ด€๋ จ๋œ ๋ฉ”์†Œ๋“œ๋“ค */


@Service
@Repository
@RequiredArgsConstructor
@Slf4j
public class ChatRoomRedisRepository {

private static final String CHAT_ROOM_KEY = "_CHAT_ROOM_RESPONSE_LIST";

private static final String CHAT_ROOM = "CHAT_ROOM_LAST_MSG"; //์ฑ„ํŒ…๋ฐฉ ๋งˆ์ง€๋ง‰ ๋ฉ”์‹œ์ง€ ์ €์žฅ



private final RedisTemplate<String, Object> redisTemplate;

private final ObjectMapper objectMapper;

@Resource(name = "redisTemplate")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@

import com.catchroom.chat.chatroom.dto.ChatRoomListGetResponse;
import com.catchroom.chat.chatroom.service.ChatRoomService;
import com.catchroom.chat.feign.client.MainFeignClient;
import com.catchroom.chat.global.common.SuccessMessage;
import com.catchroom.chat.message.dto.ChatMessageDto;
import com.catchroom.chat.global.pubsub.RedisPublisher;
import com.catchroom.chat.message.dto.MessageSubDto;
import com.catchroom.chat.message.entity.ChatMessage;
import com.catchroom.chat.message.repository.ChatMessageRepository;
import com.catchroom.chat.message.repository.ChatRoomRedisRepository;
import com.catchroom.chat.message.type.MessageType;
import com.catchroom.chat.message.type.UserIdentity;
import java.time.LocalDateTime;
import java.util.Collections;
import java.util.Comparator;

import java.util.List;

import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package com.catchroom.chat.message.repository;

import static org.junit.jupiter.api.Assertions.*;

import com.catchroom.chat.chatroom.dto.ChatRoomListGetResponse;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.List;
import org.junit.jupiter.api.Test;
Expand Down

0 comments on commit 2501c16

Please sign in to comment.