Skip to content

Commit

Permalink
[IDLE-000] 1주치 공고 일괄 크롤링 로직 수행
Browse files Browse the repository at this point in the history
  • Loading branch information
wonjunYou committed Nov 12, 2024
1 parent 275a32a commit 0042a9e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CrawlingJobScheduler(
private val crawlingJobConfig: CrawlingJobConfig,
) {

@Scheduled(cron = "0 20 16 * * *")
@Scheduled(cron = "0 00 23 * * *")
fun scheduleJob() {
val jobParameters: JobParameters = JobParametersBuilder()
.addLong("timestamp", System.currentTimeMillis())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,7 @@ class CrawlingJobPostingTasklet(
private val logger = KotlinLogging.logger { }

override fun execute(contribution: StepContribution, chunkContext: ChunkContext): RepeatStatus {
val crawlingJobPostings: List<CrawledJobPostingDto>? = try {
WorknetCrawler.run()
} catch (e: Exception) {
logger.warn {
e.toString()
}
e.printStackTrace() // 오류 로그 출력
null // 오류 발생
}
val crawlingJobPostings: List<CrawledJobPostingDto>? = WorknetCrawler.run()

if (crawlingJobPostings != null) {
crawlingJobPostings.mapNotNull { crawledJobPosting ->
Expand Down

0 comments on commit 0042a9e

Please sign in to comment.