-
Notifications
You must be signed in to change notification settings - Fork 1
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
[feat] Implement membership withdrawal logic #140
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
스케쥴러 신기해요 고생하셧슴다~~!!
// library | ||
import { keysToSnake, keysToCamel } from "../library/convertSnakeToCamel"; | ||
|
||
export const userScan = schedule.scheduleJob("0 0 0 * * *", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 0 0 * * *이 뭔지 궁금해요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 궁금해요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0초 0분 0시 매일 매달 매년
매 = *
로 이해하시면 될 것 같습니다
src/scheduler/userScheduler.ts
Outdated
// 삭제 예정 유저 | ||
const deletedUsers = await User.find(keysToSnake({ isDeleted: true })); | ||
|
||
deletedUsers.map(async (user) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 용도로 활용할때는 map 대신에 foreach가 좋을 듯~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
반환값이 불필요하고, 속도가 foreach가 더 빠르다는 점에서 동근님의 의견이 맞는것 같슴다.
수정하겠습니다
// library | ||
import { keysToSnake, keysToCamel } from "../library/convertSnakeToCamel"; | ||
|
||
export const userScan = schedule.scheduleJob("0 0 0 * * *", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 궁금해요
🌈 PR 요약 / Linked Issue
회원탈퇴 Api 추가
User Scan 스케줄러 추가
close #137
📌 변경 사항
회원탈퇴 Api 가 추가되었습니다.
매일 자정 작동하는 스케줄러를 추가하였습니다.
콘솔을 통해 스케줄러 동작을 로깅할 수 있습니다.
node-scheduler 모듈이 추가되었습니다.
✅ PR check list
1. 제목 양식 준수 확인
[feat] PR title
2. 테스트 코드 작동 스크린샷
npm run mocha
✅ After merge check list
1. 릴리즈 노트 변경
릴리즈 노트 To Do에서 Done으로 옮기기
2. 브랜치 삭제