-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PeriodicDM as decorator for any DM with data stored in the main Nu DB (…
- Loading branch information
Showing
127 changed files
with
3,065 additions
and
1,537 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
.../touk/nussknacker/engine/api/deployment/scheduler/model/DeploymentWithRuntimeParams.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package pl.touk.nussknacker.engine.api.deployment.scheduler.model | ||
|
||
import pl.touk.nussknacker.engine.api.process.{ProcessId, ProcessName, VersionId} | ||
|
||
final case class DeploymentWithRuntimeParams( | ||
processId: Option[ProcessId], | ||
processName: ProcessName, | ||
versionId: VersionId, | ||
runtimeParams: RuntimeParams, | ||
) | ||
|
||
final case class RuntimeParams(params: Map[String, String]) |
16 changes: 16 additions & 0 deletions
16
...in/scala/pl/touk/nussknacker/engine/api/deployment/scheduler/model/ScheduleProperty.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package pl.touk.nussknacker.engine.api.deployment.scheduler.model | ||
|
||
sealed trait ScheduleProperty | ||
|
||
object ScheduleProperty { | ||
sealed trait SingleScheduleProperty extends ScheduleProperty | ||
|
||
final case class MultipleScheduleProperty( | ||
schedules: Map[String, SingleScheduleProperty] | ||
) extends ScheduleProperty | ||
|
||
final case class CronScheduleProperty( | ||
labelOrCronExpr: String | ||
) extends SingleScheduleProperty | ||
|
||
} |
28 changes: 28 additions & 0 deletions
28
...l/touk/nussknacker/engine/api/deployment/scheduler/model/ScheduledDeploymentDetails.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package pl.touk.nussknacker.engine.api.deployment.scheduler.model | ||
|
||
import pl.touk.nussknacker.engine.api.process.{ProcessName, VersionId} | ||
|
||
import java.time.LocalDateTime | ||
|
||
case class ScheduledDeploymentDetails( | ||
id: Long, | ||
processName: ProcessName, | ||
versionId: VersionId, | ||
scheduleName: Option[String], | ||
createdAt: LocalDateTime, | ||
runAt: LocalDateTime, | ||
deployedAt: Option[LocalDateTime], | ||
completedAt: Option[LocalDateTime], | ||
status: ScheduledDeploymentStatus, | ||
) | ||
|
||
sealed trait ScheduledDeploymentStatus | ||
|
||
object ScheduledDeploymentStatus { | ||
case object Scheduled extends ScheduledDeploymentStatus | ||
case object Deployed extends ScheduledDeploymentStatus | ||
case object Finished extends ScheduledDeploymentStatus | ||
case object Failed extends ScheduledDeploymentStatus | ||
case object RetryingDeploy extends ScheduledDeploymentStatus | ||
case object FailedOnDeploy extends ScheduledDeploymentStatus | ||
} |
9 changes: 9 additions & 0 deletions
9
...a/pl/touk/nussknacker/engine/api/deployment/scheduler/model/ScheduledProcessDetails.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package pl.touk.nussknacker.engine.api.deployment.scheduler.model | ||
|
||
import pl.touk.nussknacker.engine.api.{MetaData, ProcessVersion} | ||
|
||
case class ScheduledProcessDetails( | ||
processVersion: ProcessVersion, | ||
processMetaData: MetaData, | ||
inputConfigDuringExecutionJson: String, | ||
) |
9 changes: 9 additions & 0 deletions
9
...ssknacker/engine/api/deployment/scheduler/services/AdditionalDeploymentDataProvider.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package pl.touk.nussknacker.engine.api.deployment.scheduler.services | ||
|
||
import pl.touk.nussknacker.engine.api.deployment.scheduler.model.ScheduledDeploymentDetails | ||
|
||
trait AdditionalDeploymentDataProvider { | ||
|
||
def prepareAdditionalData(runDetails: ScheduledDeploymentDetails): Map[String, String] | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...ssknacker/engine/api/deployment/scheduler/services/SchedulePropertyExtractorFactory.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package pl.touk.nussknacker.engine.api.deployment.scheduler.services | ||
|
||
import com.typesafe.config.Config | ||
import pl.touk.nussknacker.engine.api.deployment.scheduler.model.ScheduleProperty | ||
import pl.touk.nussknacker.engine.canonicalgraph.CanonicalProcess | ||
|
||
trait SchedulePropertyExtractorFactory { | ||
def apply(config: Config): SchedulePropertyExtractor | ||
} | ||
|
||
trait SchedulePropertyExtractor { | ||
def apply(canonicalProcess: CanonicalProcess): Either[String, ScheduleProperty] | ||
} |
31 changes: 31 additions & 0 deletions
31
...uk/nussknacker/engine/api/deployment/scheduler/services/ScheduledExecutionPerformer.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package pl.touk.nussknacker.engine.api.deployment.scheduler.services | ||
|
||
import pl.touk.nussknacker.engine.api.ProcessVersion | ||
import pl.touk.nussknacker.engine.api.deployment.scheduler.model.{DeploymentWithRuntimeParams, RuntimeParams} | ||
import pl.touk.nussknacker.engine.canonicalgraph.CanonicalProcess | ||
import pl.touk.nussknacker.engine.deployment.{DeploymentData, ExternalDeploymentId} | ||
import pl.touk.nussknacker.engine.modelconfig.InputConfigDuringExecution | ||
|
||
import scala.concurrent.Future | ||
|
||
trait ScheduledExecutionPerformer { | ||
|
||
def provideInputConfigDuringExecutionJson(): Future[InputConfigDuringExecution] | ||
|
||
def prepareDeploymentWithRuntimeParams( | ||
processVersion: ProcessVersion, | ||
): Future[DeploymentWithRuntimeParams] | ||
|
||
def deployWithRuntimeParams( | ||
deploymentWithJarData: DeploymentWithRuntimeParams, | ||
inputConfigDuringExecutionJson: String, | ||
deploymentData: DeploymentData, | ||
canonicalProcess: CanonicalProcess, | ||
processVersion: ProcessVersion, | ||
): Future[Option[ExternalDeploymentId]] | ||
|
||
def cleanAfterDeployment( | ||
runtimeParams: RuntimeParams | ||
): Future[Unit] | ||
|
||
} |
Oops, something went wrong.