mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-21 18:08:25 +00:00
ScalafmtAll
This commit is contained in:
@ -16,7 +16,7 @@ case class Ident(id: String) {
|
|||||||
def nonEmpty: Boolean =
|
def nonEmpty: Boolean =
|
||||||
!isEmpty
|
!isEmpty
|
||||||
|
|
||||||
def / (next: Ident): Ident =
|
def /(next: Ident): Ident =
|
||||||
new Ident(id + "." + next.id)
|
new Ident(id + "." + next.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,6 @@ object SolrUpdate {
|
|||||||
.withQueryParam("overwrite", "true")
|
.withQueryParam("overwrite", "true")
|
||||||
.withQueryParam("wt", "json")
|
.withQueryParam("wt", "json")
|
||||||
|
|
||||||
|
|
||||||
def add(tds: List[TextData]): F[Unit] = {
|
def add(tds: List[TextData]): F[Unit] = {
|
||||||
val req = Method.POST(tds.asJson, url)
|
val req = Method.POST(tds.asJson, url)
|
||||||
client.expect[String](req).map(r => logger.debug(s"Req: $req Response: $r"))
|
client.expect[String](req).map(r => logger.debug(s"Req: $req Response: $r"))
|
||||||
|
@ -17,7 +17,8 @@ object ItemHandler {
|
|||||||
)
|
)
|
||||||
|
|
||||||
def newItem[F[_]: ConcurrentEffect: ContextShift](
|
def newItem[F[_]: ConcurrentEffect: ContextShift](
|
||||||
cfg: Config, fts: FtsClient[F]
|
cfg: Config,
|
||||||
|
fts: FtsClient[F]
|
||||||
): Task[F, ProcessItemArgs, Unit] =
|
): Task[F, ProcessItemArgs, Unit] =
|
||||||
CreateItem[F]
|
CreateItem[F]
|
||||||
.flatMap(itemStateTask(ItemState.Processing))
|
.flatMap(itemStateTask(ItemState.Processing))
|
||||||
@ -37,7 +38,8 @@ object ItemHandler {
|
|||||||
Task(_.isLastRetry)
|
Task(_.isLastRetry)
|
||||||
|
|
||||||
def safeProcess[F[_]: ConcurrentEffect: ContextShift](
|
def safeProcess[F[_]: ConcurrentEffect: ContextShift](
|
||||||
cfg: Config, fts: FtsClient[F]
|
cfg: Config,
|
||||||
|
fts: FtsClient[F]
|
||||||
)(data: ItemData): Task[F, ProcessItemArgs, ItemData] =
|
)(data: ItemData): Task[F, ProcessItemArgs, ItemData] =
|
||||||
isLastRetry[F].flatMap {
|
isLastRetry[F].flatMap {
|
||||||
case true =>
|
case true =>
|
||||||
|
@ -10,7 +10,8 @@ import docspell.ftsclient.FtsClient
|
|||||||
object ProcessItem {
|
object ProcessItem {
|
||||||
|
|
||||||
def apply[F[_]: ConcurrentEffect: ContextShift](
|
def apply[F[_]: ConcurrentEffect: ContextShift](
|
||||||
cfg: Config, fts: FtsClient[F]
|
cfg: Config,
|
||||||
|
fts: FtsClient[F]
|
||||||
)(item: ItemData): Task[F, ProcessItemArgs, ItemData] =
|
)(item: ItemData): Task[F, ProcessItemArgs, ItemData] =
|
||||||
ExtractArchive(item)
|
ExtractArchive(item)
|
||||||
.flatMap(Task.setProgress(20))
|
.flatMap(Task.setProgress(20))
|
||||||
|
Reference in New Issue
Block a user