Documentation
¶
Overview ¶
Package orchestration runs the workflows that carry out a process. The workflows are in the workflows package and the tasks they are made of in the tasks packages; this package wires them to the workflow backend and starts them.
Index ¶
- Variables
- type ExecutionEngine
- func (w *ExecutionEngine) HandleBatchJobEmailResponse(ctx context.Context, email monitoring.Email) error
- func (w *ExecutionEngine) LaunchBatchJobCompletion(ctx context.Context, processID string) (string, error)
- func (w *ExecutionEngine) LaunchBatchJobSubmission(ctx context.Context, processID string) (string, error)
- func (w *ExecutionEngine) LaunchWorkflow(ctx context.Context, workflowID, processID string, ...) error
- func (w *ExecutionEngine) StartEngine()
Constants ¶
This section is empty.
Variables ¶
var ErrNoWorkflowBackend = errors.New("execution engine was built without a workflow backend")
Functions ¶
This section is empty.
Types ¶
type ExecutionEngine ¶
type ExecutionEngine struct {
// contains filtered or unexported fields
}
ExecutionEngine runs the workflows that carry out a process, and starts them when a process is launched or the scheduler reports its job has finished.
func NewExecutionEngine ¶
func NewExecutionEngine(dataStagingTasks *processrepo.DataStagingTaskRepository, jobSubmissionTasks *processrepo.JobSubmissionTaskRepository, jobMonitoringTasks *processrepo.JobMonitoringTaskRepository, scpStorages *datastorerepo.SCPDataStorageRepository, slurmClusterConfigs *computerepo.SlurmClusterConfigRepository, processes *processrepo.ProcessRepository, batchDeployments *applicationrepo.BatchDeploymentRepository, templates *applicationrepo.TemplateRepository, batchStatus *processrepo.BatchJobStatusRepository, processStatus *processrepo.StatusRepository, taskStatus *processrepo.TaskStatusRepository, processWorkflows *processrepo.WorkflowRepository, workflowBackend backend.Backend, sshContext *ssh.GlobalSSHContext, links batch.LinkIssuer, ) *ExecutionEngine
NewExecutionEngine returns the workflow set scheduling acts.
func (*ExecutionEngine) HandleBatchJobEmailResponse ¶
func (w *ExecutionEngine) HandleBatchJobEmailResponse(ctx context.Context, email monitoring.Email) error
This is invoked when an email related to a batch job is received. It handles the email response accordingly.
func (*ExecutionEngine) LaunchBatchJobCompletion ¶
func (*ExecutionEngine) LaunchBatchJobSubmission ¶
func (*ExecutionEngine) LaunchWorkflow ¶
func (w *ExecutionEngine) LaunchWorkflow(ctx context.Context, workflowID, processID string, workflowType model.ProcessWorkflowType) error
LaunchWorkflow starts the workflow of the given type for a process under an instance id the caller chose, so a caller can record the workflow before it starts.
func (*ExecutionEngine) StartEngine ¶
func (w *ExecutionEngine) StartEngine()
Directories
¶
| Path | Synopsis |
|---|---|
|
Package execution holds what the workflows and the tasks they run share: the context handed from one task to the next, and the lookups every task starts from.
|
Package execution holds what the workflows and the tasks they run share: the context handed from one task to the next, and the lookups every task starts from. |
|
tasks
|
|
|
batch
Package batch holds the tasks that act on a batch job through its cluster's scheduler: building the submission script, submitting it and cancelling it.
|
Package batch holds the tasks that act on a batch job through its cluster's scheduler: building the submission script, submitting it and cancelling it. |
|
data
Package data holds the task that stages a file between two storages, either of which may be a cluster reached over SSH.
|
Package data holds the task that stages a file between two storages, either of which may be a cluster reached over SSH. |
|
monitoring
Package monitoring follows a submitted batch job: the task that watches it, and the mailbox the scheduler reports its state changes to.
|
Package monitoring follows a submitted batch job: the task that watches it, and the mailbox the scheduler reports its state changes to. |
|
Package workflows defines the workflows a process is carried out by, each a sequence of the tasks in the tasks packages.
|
Package workflows defines the workflows a process is carried out by, each a sequence of the tasks in the tasks packages. |