Joex depends on backend module

The job executor depends on backend module, since it may control the
application via user tasks. The `ONode` can now be moved from the
store module into the backend module.
This commit is contained in:
Eike Kettner 2020-05-06 22:04:51 +02:00
parent 31a4323c6a
commit bd5066740d
4 changed files with 46 additions and 34 deletions

View File

@ -7,6 +7,10 @@ import microsites.ExtraMdFileConfig
val toolsPackage = taskKey[Seq[File]]("Package the scripts/extension tools")
val elmCompileMode = settingKey[ElmCompileMode]("How to compile elm sources")
// --- Settings
val sharedSettings = Seq(
organization := "com.github.eikek",
scalaVersion := "2.13.2",
@ -46,7 +50,6 @@ lazy val noPublish = Seq(
publishArtifact := false
)
val elmSettings = Seq(
elmCompileMode := ElmCompileMode.Debug,
Compile/resourceGenerators += Def.task {
@ -139,6 +142,8 @@ val openapiScalaSettings = Seq(
}))
)
// --- Modules
// Base module, everything depends on this including restapi and
@ -286,35 +291,6 @@ val joexapi = project.in(file("modules/joexapi")).
openapiSpec := (Compile/resourceDirectory).value/"joex-openapi.yml"
).dependsOn(common)
val joex = project.in(file("modules/joex")).
enablePlugins(BuildInfoPlugin
, JavaServerAppPackaging
, DebianPlugin
, SystemdPlugin).
settings(sharedSettings).
settings(testSettings).
settings(debianSettings("docspell-joex")).
settings(buildInfoSettings).
settings(
name := "docspell-joex",
libraryDependencies ++=
Dependencies.fs2 ++
Dependencies.http4s ++
Dependencies.circe ++
Dependencies.pureconfig ++
Dependencies.emilTnef ++
Dependencies.emilMarkdown ++
Dependencies.emilJsoup ++
Dependencies.jsoup ++
Dependencies.yamusca ++
Dependencies.loggingApi ++
Dependencies.logging.map(_ % Runtime),
addCompilerPlugin(Dependencies.kindProjectorPlugin),
addCompilerPlugin(Dependencies.betterMonadicFor),
buildInfoPackage := "docspell.joex",
reStart/javaOptions ++= Seq(s"-Dconfig.file=${(LocalRootProject/baseDirectory).value/"local"/"dev.conf"}")
).dependsOn(store, extract, convert, analysis, joexapi, restapi)
val backend = project.in(file("modules/backend")).
disablePlugins(RevolverPlugin).
settings(sharedSettings).
@ -343,6 +319,39 @@ val webapp = project.in(file("modules/webapp")).
openapiElmConfig := ElmConfig().withJson(ElmJson.decodePipeline)
)
// --- Application(s)
val joex = project.in(file("modules/joex")).
enablePlugins(BuildInfoPlugin
, JavaServerAppPackaging
, DebianPlugin
, SystemdPlugin).
settings(sharedSettings).
settings(testSettings).
settings(debianSettings("docspell-joex")).
settings(buildInfoSettings).
settings(
name := "docspell-joex",
libraryDependencies ++=
Dependencies.fs2 ++
Dependencies.http4s ++
Dependencies.circe ++
Dependencies.pureconfig ++
Dependencies.emilTnef ++
Dependencies.emilMarkdown ++
Dependencies.emilJsoup ++
Dependencies.jsoup ++
Dependencies.yamusca ++
Dependencies.loggingApi ++
Dependencies.logging.map(_ % Runtime),
addCompilerPlugin(Dependencies.kindProjectorPlugin),
addCompilerPlugin(Dependencies.betterMonadicFor),
buildInfoPackage := "docspell.joex",
reStart/javaOptions ++= Seq(s"-Dconfig.file=${(LocalRootProject/baseDirectory).value/"local"/"dev.conf"}")
).dependsOn(store, backend, extract, convert, analysis, joexapi, restapi)
val restserver = project.in(file("modules/restserver")).
enablePlugins(BuildInfoPlugin
, JavaServerAppPackaging
@ -379,6 +388,10 @@ val restserver = project.in(file("modules/restserver")).
reStart/javaOptions ++= Seq(s"-Dconfig.file=${(LocalRootProject/baseDirectory).value/"local"/"dev.conf"}")
).dependsOn(restapi, joexapi, backend, webapp)
// --- Microsite Documentation
val microsite = project.in(file("modules/microsite")).
disablePlugins(RevolverPlugin).
enablePlugins(MicrositesPlugin).
@ -464,7 +477,7 @@ val root = project.in(file(".")).
// --- helpers
// --- Helpers
def copyWebjarResources(src: Seq[File], base: File, artifact: String, version: String, logger: Logger): Seq[File] = {
val targetDir = base/"META-INF"/"resources"/"webjars"/artifact/version

View File

@ -5,7 +5,6 @@ import docspell.backend.auth.Login
import docspell.backend.ops._
import docspell.backend.signup.OSignup
import docspell.store.Store
import docspell.store.ops.ONode
import docspell.store.queue.JobQueue
import docspell.store.usertask.UserTaskStore

View File

@ -1,4 +1,4 @@
package docspell.store.ops
package docspell.backend.ops
import cats.effect.{Effect, Resource}
import cats.implicits._

View File

@ -10,7 +10,7 @@ import docspell.joex.scheduler._
import docspell.joexapi.client.JoexClient
import docspell.store.Store
import docspell.store.queue._
import docspell.store.ops.ONode
import docspell.backend.ops.ONode
import docspell.store.records.RJobLog
import fs2.concurrent.SignallingRef
import scala.concurrent.ExecutionContext