Merged
Conversation
b332a72 to
121f70d
Compare
Contributor
Author
|
@elegantcoder 현진님 감사합니다! multi 사용하도록 수정했습니다 |
soomtong
approved these changes
May 26, 2025
| key, | ||
| add: async (score: number, value: string): Promise<void> => { | ||
| await this.client.zadd(key, score, value); | ||
| const multi = this.client.multi(); |
Contributor
There was a problem hiding this comment.
이 경우 (single add)에도 multi 를 사용하는거에요?
- client.zadd 보다 성능이 더 좋거나.
- api 디자인 일관성을 위해
Contributor
Author
There was a problem hiding this comment.
네 single add에도 expire로 ttl을 설정해주다보니 transaction 처럼 multi를 사용해두었습니다!
| await this.client.expire(tempKey, 60); | ||
| await this.client.rename(tempKey, key); | ||
|
|
||
| const multi = this.client.multi(); |
Contributor
There was a problem hiding this comment.
데이터베이스 트랜젝션처럼 처리하는군요~ api 디자인이 일관성이 생겨서 좋은 거 같습니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 의 종류는 어떤 것인가요?
수정이 필요하게된 이유가 무엇인가요? (Jira 이슈가 있다면 링크를 연결해주세요)
여러 동작을 실행하는 경우 multi를 사용하도록 변경합니다.
무엇을 어떻게 변경했나요?
코드 변경을 이해하기 위한 배경지식이 필요하다면 설명 해주세요.
디펜던시 변경이 있나요?
어떻게 테스트 하셨나요?
테스트 코드
코드의 실행결과를 볼 수 있는 로그나 이미지가 있다면 첨부해주세요.