Allows to unsubscribe a cancel listener.
Allows to unsubscribe a cancel listener. It is sometimes useful for long running executions to dettach the cancel listener to not leak any memory.
Used a return type for the Job side effect instead of Unit
.
Used a return type for the Job side effect instead of Unit
.
We use Future[Completed]
instead of Future[Unit]
to avoid mistakes in user code because of
value discarding.
Configuration of JDBC endpoint.
Configuration of JDBC endpoint.
JDBC driver host
JDBC driver port
Configuration for the MySQL database used by Cuttle.
Configuration for the MySQL database used by Cuttle.
sequence of JDBC endpoints
JDBC database
JDBC username
JDBC password
Executions are created by the Scheduler.
Executions are created by the Scheduler.
The unique id for this execution. Guaranteed to be unique.
The Job for which this execution has been created.
The SchedulingContext for which this execution has been created.
The execution streams are scoped stdout, stderr for the execution.
The available ExecutionPlatforms for this execution.
The scoped scala.concurrent.ExecutionContext
for this execution.
An ExecutionPlatform provides controlled access to shared resources.
The scoped output streams for an Execution.
The scoped output streams for an Execution. Allows the execution to log its output.
An Executor is responsible to actually execute the SideEffect functions for the given Executions.
The job SideEffect is the most important part as it represents the real job logic to execute.
The job SideEffect is the most important part as it represents the real job logic to execute. A job is defined for a given Scheduling, for example it can be a TimeSeries job. Jobs are also Workflow with a single vertice.
The kind of Scheduling used by this job.
The internal job id. It will be sued to track the job state in the database, so it must not change over time otherwise the job will be seen as a new one by the scheduler. That id, being technical, should only use valid characters such as [a-zA-Z0-9_-.]
The scheduling configuration for the job. For example a TimeSeries job can be configured to be hourly or daily, etc.
The job name as displayed in the UI.
The job description as displayed in the UI.
The job tags used to filter jobs in the UI.
The job side effect, representing the real job execution.
A logger used to output internal informations.
The strategy to use to retry stuck executions.
The strategy to use to retry stuck executions.
When an Execution fails, the Executor keeps a track of this failure in a list of recently failed Executions.
If the Scheduler asks for the same Execution (same here is defined as an execution for the same
Job and the same SchedulingContext) during the retryWindow
defined by this strategy, it will be
considered by the Executor as a stuck execution and delayed for the duration computed by the
configured RetryStrategy.
A scheduler interpret a Workflow and instanciate Executions for all defined Jobs.
A scheduler interpret a Workflow and instanciate Executions for all defined Jobs. For example, a typical cuttle Scheduler is the TimeSeries scheduler that executes the graph for each time partition.
The king of Scheduling managed by this Scheduler.
Represent a type of scheduling.
Represent a type of scheduling. A typical cuttle scheduling is TimeSeries for example, that is a scheduling based on a calendar.
A scheduling context is the input given to each Execution that will be created for a given Scheduling.
A scheduling context is the input given to each Execution that will be created for a given Scheduling. For example, for a TimeSeries scheduling the context contain the time partition for which the job is running.
The side effect function represents the real job execution.
The side effect function represents the real job execution. It returns a Future[Completed]
to
indicate the execution result (we use Completed here instead of Unit
to avoid automatic value
discarding, but Completed do not maintain additional state).
The cuttle Executor ensures that a scheduled side effect for a given SchedulingContext will be run a least once, but cannot guarantee that it will be run exactly once. That's why the side effect function must be idempotent, meaning that if executed for the same SchedulingContext it must produce the same result.
A failed future means a failed execution.
Allow to tag a job.
Allow to tag a job. Tags can be used in the UI/API to filter jobs and more easily retrieve them.
Tag name as displayed in the UI.
Description as displayed in the UI.
Represent the workload of a Cuttle project, ie.
Represent the workload of a Cuttle project, ie. the list of jobs to be scheduled in some ways.
Doobie transactor.
Doobie transactor. See https://github.com/tpolecat/doobie.
The cuttle API is private for any write operation while it is publicly open for any read only operation.
The cuttle API is private for any write operation while it is publicly open for any read only operation. It allows to make it easy to build tooling that monitor any running cuttle scheduler while restricting access to potentially dangerous operations.
The UI access itself requires authentication.
The object to use to successfully complete a job side effect.
The object to use to successfully complete a job side effect.
Future.successful(Completed)
Utilities for DatabaseConfig.
Used to fail an execution Future when the execution has been cancelled.
Companion object for Job.
Expose cuttle metrics via the prometheus protocol.
Built-in RetryStrategy
Utilities for SchedulingContext
Defines useful ExecutionPlatforms:
Defines useful ExecutionPlatforms:
Automatically provide a scala scala.concurrent.ExecutionContext
for a given Execution.
A set of basic utilities useful to write workflows.
Core cuttle concepts are defined here.