This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathnode_execution.go
42 lines (38 loc) · 1.66 KB
/
node_execution.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package models
import (
"time"
)
// IMPORTANT: If you update the model below, be sure to double check model definitions in
// pkg/repositories/config/migration_models.go
type NodeExecutionKey struct {
ExecutionKey
NodeID string `gorm:"primary_key;index"`
}
// By convention, gorm foreign key references are of the form {ModelName}ID
type NodeExecution struct {
BaseModel
NodeExecutionKey
// Also stored in the closure, but defined as a separate column because it's useful for filtering and sorting.
Phase string
InputURI string
Closure []byte
StartedAt *time.Time
// Corresponds to the CreatedAt field in the NodeExecution closure
// Prefixed with NodeExecution to avoid clashes with gorm.Model CreatedAt
NodeExecutionCreatedAt *time.Time
// Corresponds to the UpdatedAt field in the NodeExecution closure
// Prefixed with NodeExecution to avoid clashes with gorm.Model UpdatedAt
NodeExecutionUpdatedAt *time.Time
Duration time.Duration
NodeExecutionEvents []NodeExecutionEvent
// The task execution (if any) which launched this node execution.
ParentTaskExecutionID uint `sql:"default:null" gorm:"index"`
// The workflow execution (if any) which this node execution launched
LaunchedExecution Execution `gorm:"foreignkey:ParentNodeExecutionID"`
// Execution Error Kind. nullable, can be one of core.ExecutionError_ErrorKind
ErrorKind *string `gorm:"index"`
// Execution Error Code nullable. string value, but finite set determined by the execution engine and plugins
ErrorCode *string
// If the node is of Type Task, this should always exist for a successful execution, indicating the cache status for the execution
CacheStatus *string
}