Skip to content

Commit

Permalink
log error for vacancynoti batch (#167)
Browse files Browse the repository at this point in the history
Co-authored-by: Hank-Choi <[email protected]>
  • Loading branch information
davin111 and Hank-Choi authored Sep 4, 2023
1 parent 2e0fbfd commit d1516a2
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import org.jsoup.nodes.Element
import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service
import java.time.LocalDate
import kotlin.time.Duration.Companion.seconds

interface VacancyNotifierService {
suspend fun noti(coursebook: Coursebook): VacancyNotificationJobResult
Expand All @@ -52,8 +53,8 @@ class VacancyNotifierServiceImpl(
val pageCount = runCatching {
getPageCount()
}.getOrElse {
log.error("부하기간")
delay(5000)
log.error("에러가 발생했거나 부하 기간입니다. {}", it.message, it)
delay(30L.seconds)
return VacancyNotificationJobResult.OVERLOAD_PERIOD
}
val lectures =
Expand Down

0 comments on commit d1516a2

Please sign in to comment.