From e7723ed1b710780adca793887b15a181cfe3241f Mon Sep 17 00:00:00 2001 From: Sylvain Pendino Date: Wed, 27 Mar 2019 14:19:26 +0100 Subject: [PATCH] Make Executor and DatabaseConfig visibility public Those classes will be used outside of cuttle --- build.sbt | 2 +- core/src/main/scala/com/criteo/cuttle/Database.scala | 2 +- core/src/main/scala/com/criteo/cuttle/Executor.scala | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build.sbt b/build.sbt index 5c9260855..583593dbc 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ val devMode = settingKey[Boolean]("Some build optimization are applied in devMode.") val writeClasspath = taskKey[File]("Write the project classpath to a file.") -val VERSION = "0.9.2" +val VERSION = "0.9.3" lazy val catsCore = "1.5.0" lazy val circe = "0.10.1" diff --git a/core/src/main/scala/com/criteo/cuttle/Database.scala b/core/src/main/scala/com/criteo/cuttle/Database.scala index a1d3d99ae..e54699598 100644 --- a/core/src/main/scala/com/criteo/cuttle/Database.scala +++ b/core/src/main/scala/com/criteo/cuttle/Database.scala @@ -66,7 +66,7 @@ object DatabaseConfig { } } -private[cuttle] object Database { +object Database { implicit val JsonMeta: Meta[Json] = Meta[String].imap(x => parse(x).fold(e => throw e, identity _))( x => x.noSpaces diff --git a/core/src/main/scala/com/criteo/cuttle/Executor.scala b/core/src/main/scala/com/criteo/cuttle/Executor.scala index d7493f9f9..233743ba3 100755 --- a/core/src/main/scala/com/criteo/cuttle/Executor.scala +++ b/core/src/main/scala/com/criteo/cuttle/Executor.scala @@ -377,13 +377,13 @@ trait ExecutionPlatform { def waiting: Set[Execution[_]] } -private[cuttle] object ExecutionPlatform { +object ExecutionPlatform { implicit def fromExecution(implicit e: Execution[_]): Seq[ExecutionPlatform] = e.platforms def lookup[E: ClassTag](implicit platforms: Seq[ExecutionPlatform]): Option[E] = platforms.find(classTag[E].runtimeClass.isInstance).map(_.asInstanceOf[E]) } -private[cuttle] object Executor { +object Executor { // we save a mapping of ThreadName -> ExecutionStreams to be able to redirect logs comming // form different SideEffect (Futures) to the corresponding ExecutionStreams @@ -394,7 +394,7 @@ private[cuttle] object Executor { /** An [[Executor]] is responsible to actually execute the [[SideEffect]] functions for the * given [[Execution Executions]]. */ -class Executor[S <: Scheduling] private[cuttle] ( +class Executor[S <: Scheduling] ( val platforms: Seq[ExecutionPlatform], xa: XA, logger: Logger,