Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TaskName = "run_task_background" TaskDescriptor = &types.TaskDescriptor{ Name: TaskName, Description: "Runs foreground and background task with configurable dependencies.", Category: "flow-control", Config: DefaultConfig(), Outputs: []types.TaskOutputDefinition{}, NewTask: NewTask, } )
Functions ¶
func NewTask ¶
func NewTask(ctx *types.TaskContext, options *types.TaskOptions) (types.Task, error)
Types ¶
type Config ¶
type Config struct {
ForegroundTask *helper.RawMessageMasked `yaml:"foregroundTask" json:"foregroundTask" require:"A" desc:"The primary task to execute in the foreground."`
BackgroundTask *helper.RawMessageMasked `yaml:"backgroundTask" json:"backgroundTask" desc:"The task to execute in the background while foreground runs."`
NewVariableScope bool `yaml:"newVariableScope" json:"newVariableScope" desc:"If true, create a new variable scope for child tasks."`
// When to complete (based on foreground task result)
// These allow early exit even if foreground task hasn't returned yet
ExitOnForegroundSuccess bool `yaml:"exitOnForegroundSuccess" json:"exitOnForegroundSuccess" desc:"If true, exit immediately when foreground task succeeds."`
ExitOnForegroundFailure bool `yaml:"exitOnForegroundFailure" json:"exitOnForegroundFailure" desc:"If true, exit immediately when foreground task fails."`
// What happens if background task completes first
// "ignore" (default) - do nothing
// "fail" - exit with failure
// "succeed" / "success" - exit with success
// "failOrIgnore" - exit with failure if background task failed, ignore on success
OnBackgroundComplete string `` /* 149-byte string literal not displayed */
}
func DefaultConfig ¶
func DefaultConfig() Config
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
func (*Task) LoadConfig ¶
Click to show internal directories.
Click to hide internal directories.