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

Bug/#315 period 중복데이터 문제, 다중 계좌 priority queue 문제 해결 #333

Merged
merged 12 commits into from
Dec 2, 2024

Conversation

swkim12345
Copy link
Collaborator

@swkim12345 swkim12345 commented Dec 2, 2024

close #315

✅ 작업 내용

  • period 중복 데이터 문제 해결
  • 기간 제한 - api 한번 콜
  • 다중 계좌일 때 발생하는 priority queue 문제 해결
  • date 기능 확장한 NewDate 구현
  • stockPeriodData 안 쓰이는 함수 삭제

😎 체크 사항

  • label 설정 확인
  • 브랜치 방향 확인

@swkim12345 swkim12345 added 🐞 bugfix Something isn't working 🔨 refactor 코드 리팩토링 BE labels Dec 2, 2024
Copy link
Collaborator

@xjfcnfw3 xjfcnfw3 left a comment

Choose a reason for hiding this comment

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

날짜 로직을 만드는데 고생 많으셨습니다! 👍

return async (data: Json) => {
if (!data.output2 || !Array.isArray(data.output2)) return;
// 이거 빈값들어오는 케이스 있음(빈값 필터링 안하면 요청이 매우 많아짐)
data.output2 = data.output2.filter(
Copy link
Collaborator

Choose a reason for hiding this comment

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

이거 나중에 함수로 빼야겠네요

}

/* eslint-disable-next-line max-lines-per-function */
private getLiveDataSaveUntilEndCallback(
Copy link
Collaborator

Choose a reason for hiding this comment

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

이건 과거 데이터 전부 받는 건가요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

넵 맞습니다! 일단 다른 콜백으로 빼놓았고, 나중에 쓰일지 몰라서 삭제는 하지 않았습니다.

@@ -205,8 +173,38 @@ export class OpenapiPeriodData {
});
}

private async insertChartData(stock: StockData, entity: typeof StockData) {
private isSamePeriod(stock: StockData, period: Period, date: Date) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

로직 만드느라 수고 많으셨습니다!

else super();
}

//eslint-disable-next-line @typescript-eslint/no-explicit-any
Copy link
Collaborator

Choose a reason for hiding this comment

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

이런 주석은 언제가 없애야 될거 같긴해요

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

아... 이건 진짜 방법이 없더라고요. 타입 체크 로직인데 타입 체크하기 전에는 받을 수 있게 해야하니..

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

unknown은 문제가 없네요 interface를 이용한 방법으로 리팩토링할 수 있을 거 같습니다
https://stackoverflow.com/questions/51624117/how-to-check-for-the-property-type-of-an-unknown-value

Copy link
Collaborator

@baegyeong baegyeong left a comment

Choose a reason for hiding this comment

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

LGTM!!!

period: Period,
end: string,
) {
/* eslint-disable-next-line max-lines-per-function */
Copy link
Collaborator

Choose a reason for hiding this comment

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

요거 eslint 설정 off 하지 않았나요?!

@@ -205,8 +173,38 @@ export class OpenapiPeriodData {
});
}

private async insertChartData(stock: StockData, entity: typeof StockData) {
private isSamePeriod(stock: StockData, period: Period, date: Date) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

와우.. 엄청나요

@swkim12345 swkim12345 merged commit e1bb6b8 into dev-be Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE 🐞 bugfix Something isn't working 🔨 refactor 코드 리팩토링
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants