gateway api: return if run is stopping
This commit is contained in:
parent
bda7a3eb8b
commit
e2bee03a06
|
@ -54,6 +54,7 @@ type RunResponse struct {
|
||||||
Phase rstypes.RunPhase `json:"phase"`
|
Phase rstypes.RunPhase `json:"phase"`
|
||||||
Result rstypes.RunResult `json:"result"`
|
Result rstypes.RunResult `json:"result"`
|
||||||
SetupErrors []string `json:"setup_errors"`
|
SetupErrors []string `json:"setup_errors"`
|
||||||
|
Stopping bool `json:"stopping"`
|
||||||
|
|
||||||
Tasks map[string]*RunResponseTask `json:"tasks"`
|
Tasks map[string]*RunResponseTask `json:"tasks"`
|
||||||
TasksWaitingApproval []string `json:"tasks_waiting_approval"`
|
TasksWaitingApproval []string `json:"tasks_waiting_approval"`
|
||||||
|
@ -122,7 +123,9 @@ func createRunResponse(r *rstypes.Run, rc *rstypes.RunConfig) *RunResponse {
|
||||||
Annotations: r.Annotations,
|
Annotations: r.Annotations,
|
||||||
Phase: r.Phase,
|
Phase: r.Phase,
|
||||||
Result: r.Result,
|
Result: r.Result,
|
||||||
|
Stopping: r.Stop,
|
||||||
SetupErrors: rc.SetupErrors,
|
SetupErrors: rc.SetupErrors,
|
||||||
|
|
||||||
Tasks: make(map[string]*RunResponseTask),
|
Tasks: make(map[string]*RunResponseTask),
|
||||||
TasksWaitingApproval: r.TasksWaitingApproval(),
|
TasksWaitingApproval: r.TasksWaitingApproval(),
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue