Skip to content

Commit

Permalink
Merge pull request #11 from great-park/main
Browse files Browse the repository at this point in the history
  • Loading branch information
great-park authored Oct 23, 2022
2 parents 3a9bd30 + a7c63fd commit 2c8fa36
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/agent/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export async function sendingRequest(subscribeList) {
const { categorySet, emailList } = subscribeList[i];
const data: bulkSendDto = { categorySet, emailList }

await bulkSend(data).then(() => logger.info(`categorySet : ${categorySet} | Sending is done`));
await bulkSend(data).then(() => logger.info(`🚀categorySet : ${categorySet} | [${i + 1}] Sending is done🚀`));
}
} catch (error) {
logger.error('sendingRequest Error, message :', { message: error.toString() });
Expand Down
2 changes: 1 addition & 1 deletion src/app/redis/redisfactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export async function redisFactory(categoryList: string[]): Promise<void> {
// }
// loop 끝나면 contents 완성
await redisCli.set(category, contents).then(() => {
logger.info(`category : "${category}" | Redis Caching is done`)
logger.info(`category : "${category}" Add To Redis Cache`)
})
}

Expand Down
6 changes: 3 additions & 3 deletions src/app/scheduler/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ export function mainJob() {
minuteRule.minute = 7; // 배포시 구체적인 시간 설정

const specificTimeJob = schedule.scheduleJob(minuteRule, async function () {
logger.info('시간이 되었습니다. 실행합니다.');
logger.info('🎉 Start Schedule Job! 🎉');

//-----test를 위해 임시 처리
// 1. <To do> "오늘 생성된 공지사항"들의 카테고리 추출
const categoryList: string[] = ['testA', 'testB', 'testC'] // *임시 선언*

await redisFactory(categoryList).then(() => {
logger.info('redis setting is done');
logger.info('📦 Redis Caching is Done 📦');
})

await sendingAgent(categoryList);
}).then(() => { logger.info('scheduler 작업이 성공적으로 완료되었습니다.') });
});

} catch (error) {
logger.error(`mainJob Scheduler failed, message :`, { message: error.toString() });
Expand Down
2 changes: 1 addition & 1 deletion src/config/winston.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createLogger, format, transports } from 'winston';
import { createLogger, format, transports, addColors } from 'winston';
import 'winston-daily-rotate-file';
import * as fs from 'fs';

Expand Down

0 comments on commit 2c8fa36

Please sign in to comment.