mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Replace http4s-blaze-client
with http4s-ember-client
.
This commit is contained in:
@ -19,8 +19,8 @@ import docspell.store.Store
|
||||
import docspell.store.records.RInternalSetting
|
||||
|
||||
import org.http4s.HttpApp
|
||||
import org.http4s.blaze.client.BlazeClientBuilder
|
||||
import org.http4s.blaze.server.BlazeServerBuilder
|
||||
import org.http4s.ember.client.EmberClientBuilder
|
||||
import org.http4s.implicits._
|
||||
import org.http4s.server.Router
|
||||
import org.http4s.server.middleware.Logger
|
||||
@ -46,7 +46,7 @@ object JoexServer {
|
||||
pools.connectEC
|
||||
)
|
||||
settings <- Resource.eval(store.transact(RInternalSetting.create))
|
||||
httpClient <- BlazeClientBuilder[F].resource
|
||||
httpClient <- EmberClientBuilder.default[F].build
|
||||
pubSub <- NaivePubSub(
|
||||
cfg.pubSubConfig(settings.internalRouteKey),
|
||||
store,
|
||||
@ -64,7 +64,7 @@ object JoexServer {
|
||||
).orNotFound
|
||||
|
||||
// With Middlewares in place
|
||||
finalHttpApp = Logger.httpApp(false, false)(httpApp)
|
||||
finalHttpApp = Logger.httpApp(logHeaders = false, logBody = false)(httpApp)
|
||||
|
||||
} yield App(finalHttpApp, signal, exitCode)
|
||||
|
||||
|
@ -15,8 +15,8 @@ import docspell.scheduler.Task
|
||||
import docspell.store.Store
|
||||
import docspell.store.records._
|
||||
|
||||
import org.http4s.blaze.client.BlazeClientBuilder
|
||||
import org.http4s.client.Client
|
||||
import org.http4s.ember.client.EmberClientBuilder
|
||||
|
||||
object CheckNodesTask {
|
||||
def apply[F[_]: Async](
|
||||
@ -27,8 +27,7 @@ object CheckNodesTask {
|
||||
if (cfg.enabled)
|
||||
for {
|
||||
_ <- ctx.logger.info("Check nodes reachability")
|
||||
ec = scala.concurrent.ExecutionContext.global
|
||||
_ <- BlazeClientBuilder[F].withExecutionContext(ec).resource.use { client =>
|
||||
_ <- EmberClientBuilder.default[F].build.use { client =>
|
||||
checkNodes(ctx.logger, store, client)
|
||||
}
|
||||
_ <- ctx.logger.info(
|
||||
|
Reference in New Issue
Block a user