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

부리미 서버 1.09v 배포 #178

Merged
merged 5 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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