diff --git a/src/db/data/noticeHandler.ts b/src/db/data/noticeHandler.ts index fbeec2a..1a26e14 100644 --- a/src/db/data/noticeHandler.ts +++ b/src/db/data/noticeHandler.ts @@ -27,7 +27,6 @@ export const saveDepartmentToDB = async (college: College[]): Promise => { await db.execute(saveCollegeQuery); console.log('단과대 입력 성공!'); } catch (error) { - console.log(error.message, data); await notificationToSlack(`DB에 학과 삽입 실패`); } }); @@ -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 고정 공지로 변경 실패'); } }; @@ -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; } diff --git a/src/hooks/cronNoticeCrawling.ts b/src/hooks/cronNoticeCrawling.ts index 3945a89..d8ced5e 100644 --- a/src/hooks/cronNoticeCrawling.ts +++ b/src/hooks/cronNoticeCrawling.ts @@ -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(); }); diff --git a/src/utils/majorUtils.ts b/src/utils/majorUtils.ts index 02a599c..70cfbcd 100644 --- a/src/utils/majorUtils.ts +++ b/src/utils/majorUtils.ts @@ -13,7 +13,7 @@ export const getDepartmentIdByMajor = async (major: string) => { ); if (!departmentId.length) { - notificationToSlack('잘못된 학과 입력'); + notificationToSlack(major + '잘못된 학과 입력'); return; } return departmentId[0].id;