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

#573 2025 봄 이벤트 간접 초대 기능 추가 #574

Merged
merged 5 commits into from
Feb 19, 2025

Conversation

thxx132
Copy link
Contributor

@thxx132 thxx132 commented Feb 19, 2025

Summary

다단계 시스템을 추가했습니다

It closes #573

@thxx132 thxx132 self-assigned this Feb 19, 2025
@thxx132 thxx132 linked an issue Feb 19, 2025 that may be closed by this pull request
1 task
Copy link
Member

@kmc7468 kmc7468 left a comment

Choose a reason for hiding this comment

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

LGTM! 성능 개선의 여지가 있을 것 같아서 코멘트 하나 남겨두었습니다..!

Comment on lines 140 to 152
let currentInviter = inviterStatus;
while (currentInviter?.inviter) {
const higherInviter = await eventStatusModel
.findOne({ userId: currentInviter.inviter })
.lean();
if (!higherInviter) break;

await contracts.completeIndirectEventSharingQuest(
higherInviter.userId,
req.timestamp
);
currentInviter = higherInviter;
}
Copy link
Member

Choose a reason for hiding this comment

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

ancestor들의 object id를 먼저 다 구해서 배열에 저장하고, Promise.all 을 이용해서 일괄적으로 퀘스트 완료 처리를 하면 어떨까요? completeQuest 내부에서 DB에 자주 접근해서, 이렇게 순차적으로 처리하면 성능 병목이 발생할 것 같습니다.

Copy link
Member

@kmc7468 kmc7468 left a comment

Choose a reason for hiding this comment

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

LGTM!

@thxx132 thxx132 merged commit 047aca9 into dev Feb 19, 2025
1 check passed
@thxx132 thxx132 deleted the 573-indirect-Event-Sharing branch February 19, 2025 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2025 봄 이벤트 간접 초대 기능 추가
2 participants