Skip to content

Commit

Permalink
feat(noticeHandler): 예기치 못한 에러로 공지시항 크롤링 실패한 학과는 슬랙 알림을 받도록 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
pp449 committed Feb 4, 2024
1 parent a4685c2 commit 2daf2b6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/db/data/noticeHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ export const saveMajorNoticeToDB = async (): Promise<PushNoti> => {
});

await Promise.all(savePromises);
if (failedMajor.length !== 0) {
const failedMajorList = failedMajor.join();
notificationToSlack('크롤링 실패한 학과: ' + failedMajorList);
}

return newNoticeMajor;
};

Expand Down

0 comments on commit 2daf2b6

Please sign in to comment.