7aa7790931
Process spawn/wait/kill functions for subprocess management with output capture, timeout, and process group cleanup. DagRun and DagStepResult types for SQLite execution persistence. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
31 lines
691 B
Go
31 lines
691 B
Go
package infra
|
|
|
|
import "time"
|
|
|
|
// DagRun represents one execution of a DAG workflow.
|
|
type DagRun struct {
|
|
ID string
|
|
DagName string
|
|
DagPath string
|
|
Status string // pending, running, success, failed, cancelled
|
|
StartedAt time.Time
|
|
FinishedAt time.Time
|
|
Trigger string // manual, cron, api
|
|
Error string
|
|
}
|
|
|
|
// DagStepResult represents the outcome of one step within a DagRun.
|
|
type DagStepResult struct {
|
|
ID string
|
|
RunID string
|
|
StepName string
|
|
Status string // pending, running, success, failed, skipped
|
|
ExitCode int
|
|
Stdout string
|
|
Stderr string
|
|
StartedAt time.Time
|
|
FinishedAt time.Time
|
|
DurationMs int64
|
|
Error string
|
|
}
|