Update http4s to 0.23.6

This commit is contained in:
eikek
2021-10-24 18:24:03 +02:00
parent cd0f7ec66e
commit 48d2bec9c4
12 changed files with 22 additions and 45 deletions

View File

@ -116,11 +116,10 @@ object JoexAppImpl {
def create[F[_]: Async](
cfg: Config,
termSignal: SignallingRef[F, Boolean],
connectEC: ExecutionContext,
clientEC: ExecutionContext
connectEC: ExecutionContext
): Resource[F, JoexApp[F]] =
for {
httpClient <- BlazeClientBuilder[F](clientEC).resource
httpClient <- BlazeClientBuilder[F].resource
client = JoexClient(httpClient)
store <- Store.create(cfg.jdbc, cfg.files.chunkSize, connectEC)
queue <- JobQueue(store)

View File

@ -33,9 +33,7 @@ object JoexServer {
val app = for {
signal <- Resource.eval(SignallingRef[F, Boolean](false))
exitCode <- Resource.eval(Ref[F].of(ExitCode.Success))
joexApp <-
JoexAppImpl
.create[F](cfg, signal, pools.connectEC, pools.httpClientEC)
joexApp <- JoexAppImpl.create[F](cfg, signal, pools.connectEC)
httpApp = Router(
"/api/info" -> InfoRoutes(cfg),
@ -50,7 +48,7 @@ object JoexServer {
Stream
.resource(app)
.flatMap(app =>
BlazeServerBuilder[F](pools.restEC)
BlazeServerBuilder[F]
.bindHttp(cfg.bind.port, cfg.bind.address)
.withHttpApp(app.httpApp)
.withoutBanner

View File

@ -60,11 +60,7 @@ object Main extends IOApp {
logger.warn(">>>>> Docspell is running in DEV mode! <<<<<")
}
val pools = for {
cec <- connectEC
bec <- blockingEC
rec <- restserverEC
} yield Pools(cec, bec, rec)
val pools = connectEC.map(Pools.apply)
pools.use(p =>
JoexServer
.stream[IO](cfg, p)

View File

@ -26,7 +26,7 @@ object CheckNodesTask {
for {
_ <- ctx.logger.info("Check nodes reachability")
ec = scala.concurrent.ExecutionContext.global
_ <- BlazeClientBuilder[F](ec).resource.use { client =>
_ <- BlazeClientBuilder[F].withExecutionContext(ec).resource.use { client =>
checkNodes(ctx, client)
}
_ <- ctx.logger.info(