mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-02-15 20:33:26 +00:00
Update fs2-core, fs2-io to 2.5.4
This commit is contained in:
parent
e8f61c67d0
commit
144ea852bf
@ -37,7 +37,7 @@ object TextAnalyser {
|
||||
blocker: Blocker
|
||||
): Resource[F, TextAnalyser[F]] =
|
||||
Resource
|
||||
.liftF(Nlp(cfg.nlpConfig))
|
||||
.eval(Nlp(cfg.nlpConfig))
|
||||
.map(stanfordNer =>
|
||||
new TextAnalyser[F] {
|
||||
def annotate(
|
||||
|
@ -47,8 +47,8 @@ object PipelineCache {
|
||||
def obtain(key: String, settings: NlpSettings): Resource[F, Annotator[F]] =
|
||||
for {
|
||||
_ <- cacheClear.withCache
|
||||
id <- Resource.liftF(makeSettingsId(settings))
|
||||
nlp <- Resource.liftF(
|
||||
id <- Resource.eval(makeSettingsId(settings))
|
||||
nlp <- Resource.eval(
|
||||
data.modify(cache => getOrCreate(key, id, cache, settings, creator))
|
||||
)
|
||||
} yield nlp
|
||||
|
@ -28,8 +28,8 @@ object JoexServer {
|
||||
)(implicit T: Timer[F]): Stream[F, Nothing] = {
|
||||
|
||||
val app = for {
|
||||
signal <- Resource.liftF(SignallingRef[F, Boolean](false))
|
||||
exitCode <- Resource.liftF(Ref[F].of(ExitCode.Success))
|
||||
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, pools.blocker)
|
||||
|
@ -38,7 +38,7 @@ object RegexNerFile {
|
||||
): Resource[F, RegexNerFile[F]] =
|
||||
for {
|
||||
dir <- File.withTempDir[F](cfg.directory, "regexner-")
|
||||
writer <- Resource.liftF(Semaphore(1))
|
||||
writer <- Resource.eval(Semaphore(1))
|
||||
} yield new Impl[F](cfg.copy(directory = dir), blocker, store, writer)
|
||||
|
||||
final private class Impl[F[_]: Concurrent: ContextShift](
|
||||
|
@ -40,8 +40,8 @@ object PeriodicScheduler {
|
||||
timer: Timer[F]
|
||||
): Resource[F, PeriodicScheduler[F]] =
|
||||
for {
|
||||
waiter <- Resource.liftF(SignallingRef(true))
|
||||
state <- Resource.liftF(SignallingRef(PeriodicSchedulerImpl.emptyState[F]))
|
||||
waiter <- Resource.eval(SignallingRef(true))
|
||||
state <- Resource.eval(SignallingRef(PeriodicSchedulerImpl.emptyState[F]))
|
||||
psch = new PeriodicSchedulerImpl[F](
|
||||
cfg,
|
||||
sch,
|
||||
@ -52,7 +52,7 @@ object PeriodicScheduler {
|
||||
state,
|
||||
timer
|
||||
)
|
||||
_ <- Resource.liftF(psch.init)
|
||||
_ <- Resource.eval(psch.init)
|
||||
} yield psch
|
||||
|
||||
}
|
||||
|
@ -46,9 +46,9 @@ case class SchedulerBuilder[F[_]: ConcurrentEffect: ContextShift](
|
||||
def resource: Resource[F, Scheduler[F]] = {
|
||||
val scheduler = for {
|
||||
jq <- queue
|
||||
waiter <- Resource.liftF(SignallingRef(true))
|
||||
state <- Resource.liftF(SignallingRef(SchedulerImpl.emptyState[F]))
|
||||
perms <- Resource.liftF(Semaphore(config.poolSize.toLong))
|
||||
waiter <- Resource.eval(SignallingRef(true))
|
||||
state <- Resource.eval(SignallingRef(SchedulerImpl.emptyState[F]))
|
||||
perms <- Resource.eval(Semaphore(config.poolSize.toLong))
|
||||
} yield new SchedulerImpl[F](
|
||||
config,
|
||||
blocker,
|
||||
|
@ -158,7 +158,7 @@ object TemplateRoutes {
|
||||
|
||||
private def memo[F[_]: Sync, A](fa: => F[A]): F[A] = {
|
||||
val ref = new AtomicReference[A]()
|
||||
Sync[F].suspend {
|
||||
Sync[F].defer {
|
||||
Option(ref.get) match {
|
||||
case Some(a) => a.pure[F]
|
||||
case None =>
|
||||
|
@ -42,7 +42,7 @@ object Store {
|
||||
for {
|
||||
xa <- hxa
|
||||
st = new StoreImpl[F](jdbc, xa)
|
||||
_ <- Resource.liftF(st.migrate)
|
||||
_ <- Resource.eval(st.migrate)
|
||||
} yield st
|
||||
}
|
||||
}
|
||||
|
@ -62,6 +62,6 @@ object StoreFixture {
|
||||
for {
|
||||
xa <- makeXA(jdbc)
|
||||
store = new StoreImpl[IO](jdbc, xa)
|
||||
_ <- Resource.liftF(store.migrate)
|
||||
_ <- Resource.eval(store.migrate)
|
||||
} yield store
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ object Dependencies {
|
||||
val EmilVersion = "0.7.3"
|
||||
val FlexmarkVersion = "0.62.2"
|
||||
val FlywayVersion = "7.7.1"
|
||||
val Fs2Version = "2.5.3"
|
||||
val Fs2Version = "2.5.4"
|
||||
val H2Version = "1.4.200"
|
||||
val Http4sVersion = "0.21.20"
|
||||
val Icu4jVersion = "68.2"
|
||||
|
Loading…
Reference in New Issue
Block a user