Skip to content

Commit

Permalink
Merge pull request #178 from GDSC-PKNU-Official/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
pp449 authored Jan 18, 2024
2 parents 5d9336b + 8f104c6 commit 4750d8f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/db/data/noticeHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export const saveDepartmentToDB = async (college: College[]): Promise<void> => {
await db.execute(saveCollegeQuery);
console.log('단과대 입력 성공!');
} catch (error) {
console.log(error.message, data);
await notificationToSlack(`DB에 학과 삽입 실패`);
}
});
Expand Down Expand Up @@ -84,7 +83,8 @@ const convertSpecificNoticeToPinnedNotice = async (
try {
await db.execute(query);
} catch (error) {
notificationToSlack(error.message + '\n 고정 공지로 변경 실패');
console.log(error.message + '고정 공지로 변경 실패');
// notificationToSlack(error.message + '\n 고정 공지로 변경 실패');
}
};

Expand Down Expand Up @@ -119,7 +119,7 @@ export const saveMajorNoticeToDB = async (
for (const notice of normalNotices) {
const result = await noticeContentCrawling(notice);
if (result.link === '') {
notificationToSlack(`${notice} 콘텐츠 크롤링 실패`);
// notificationToSlack(`${notice} 콘텐츠 크롤링 실패`);
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion src/hooks/cronNoticeCrawling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const cronExtracurricularCrawling = async () => {
}
};

cron.schedule('0 0-9 * * 1-5', async () => {
cron.schedule('0 0-9/2 * * 1-5', async () => {
cronNoticeCrawling();
});

Expand Down
2 changes: 1 addition & 1 deletion src/utils/majorUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const getDepartmentIdByMajor = async (major: string) => {
);

if (!departmentId.length) {
notificationToSlack('잘못된 학과 입력');
notificationToSlack(major + '잘못된 학과 입력');
return;
}
return departmentId[0].id;
Expand Down

0 comments on commit 4750d8f

Please sign in to comment.