mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Update http4s to 0.23.6
This commit is contained in:
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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(
|
||||
|
Reference in New Issue
Block a user