Skip to content

Commit

Permalink
rename pool -> pull
Browse files Browse the repository at this point in the history
  • Loading branch information
wtsiamruk committed Mar 23, 2021
1 parent b94ab79 commit c172627
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ import org.springframework.transaction.reactive.TransactionalOperator
import org.springframework.transaction.reactive.executeAndAwait

@Component
class LeetCodeProblemsPoolingTask(
class LeetCodeProblemsPullingTask(
private val leetCodeProblemsScraper: LeetCodeProblemsScraper,
private val problemProblemRepository: ProblemRepository,
private val txOperator : TransactionalOperator,
) {

companion object {
private val log = LoggerFactory.getLogger(LeetCodeProblemsPoolingTask::class.java)!!
private val log = LoggerFactory.getLogger(LeetCodeProblemsPullingTask::class.java)!!
}

@Scheduled(cron = "0 0 0 * * 7")
@Suppress("BlockingMethodInNonBlockingContext") // Scheduled uses separate native thread
fun runPool() = runBlocking {
fun pull() = runBlocking {
txOperator.executeAndAwait {
log.info("getting saved leetcode problems")
val links = problemProblemRepository.findAllProjectedBy().map { it.link }.toSet()
Expand Down

0 comments on commit c172627

Please sign in to comment.