Skip to content

Commit

Permalink
feat: 스케줄러 off (#494)
Browse files Browse the repository at this point in the history
  • Loading branch information
injoon2019 authored Oct 3, 2024
1 parent c9edc91 commit c622bf8
Showing 1 changed file with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.nexters.bottles.app.notification.component

import com.fasterxml.jackson.databind.ObjectMapper
import com.nexters.bottles.app.bottle.domain.enum.PingPongStatus
import com.nexters.bottles.app.bottle.repository.BottleRepository
import com.nexters.bottles.app.bottle.repository.LetterRepository
Expand Down Expand Up @@ -73,14 +74,16 @@ class StatisticsScheduler(
)
)

val response = webClient.post()
.contentType(MediaType.APPLICATION_JSON)
.body(BodyInserters.fromValue(request))
.retrieve()
.bodyToMono(String::class.java)
.block()
log.info { "Sending request to Slack: ${ObjectMapper().writeValueAsString(request)}" }

log.info { "response: $response" }
// val response = webClient.post()
// .contentType(MediaType.APPLICATION_JSON)
// .body(BodyInserters.fromValue(request))
// .retrieve()
// .bodyToMono(String::class.java)
// .block()
//
// log.info { "response: $response" }
}

@Scheduled(cron = "* * 10 * * 1")
Expand Down Expand Up @@ -118,11 +121,11 @@ class StatisticsScheduler(
)
)

val response = webClient.post()
.contentType(MediaType.APPLICATION_JSON)
.body(BodyInserters.fromValue(request))
.retrieve()
.bodyToMono(String::class.java)
.block()
// val response = webClient.post()
// .contentType(MediaType.APPLICATION_JSON)
// .body(BodyInserters.fromValue(request))
// .retrieve()
// .bodyToMono(String::class.java)
// .block()
}
}

0 comments on commit c622bf8

Please sign in to comment.