File tree 2 files changed +4
-4
lines changed
telegram-bot/src/main/kotlin/by/jprof/coding/problems/bot/task
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -16,14 +16,14 @@ import org.springframework.transaction.reactive.TransactionalOperator
16
16
import org.springframework.transaction.reactive.executeAndAwait
17
17
18
18
@Component
19
- class DailyTaskPoster (
19
+ class DailyProblemPostingTask (
20
20
private val problemProblemRepository : ProblemRepository ,
21
21
private val chatRepository : ChatRepository ,
22
22
private val txOperator : TransactionalOperator ,
23
23
private val tgBot : TelegramBot
24
24
) {
25
25
@Scheduled(cron = " 0 0 12 * * *" )
26
- fun postDailyTask () = runBlocking {
26
+ fun postDailyProblem () = runBlocking {
27
27
txOperator.executeAndAwait {
28
28
val problems = problemProblemRepository.findAll().toList()
29
29
val randomProblem = problems.random()
Original file line number Diff line number Diff line change @@ -13,14 +13,14 @@ import org.springframework.transaction.reactive.TransactionalOperator
13
13
import org.springframework.transaction.reactive.executeAndAwait
14
14
15
15
@Component
16
- class PoolLeetcodeProblem (
16
+ class LeetCodeProblemsPoolingTask (
17
17
private val leetCodeProblemsScraper : LeetCodeProblemsScraper ,
18
18
private val problemProblemRepository : ProblemRepository ,
19
19
private val txOperator : TransactionalOperator ,
20
20
) {
21
21
22
22
companion object {
23
- private val log = LoggerFactory .getLogger(PoolLeetcodeProblem ::class .java)!!
23
+ private val log = LoggerFactory .getLogger(LeetCodeProblemsPoolingTask ::class .java)!!
24
24
}
25
25
26
26
@Scheduled(cron = " 0 0 0 * * 7" )
You canβt perform that action at this time.
0 commit comments