Skip to content

Commit

Permalink
Handle "stopping" runs similarly to "stopped" runs
Browse files Browse the repository at this point in the history
  • Loading branch information
mhmdiaa committed Jul 26, 2024
1 parent a9e5400 commit 18a2ca3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/execute/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func WatchRun(runID uuid.UUID, downloadPath string, nodesToDownload map[string]o
return
}

if run.Status == "COMPLETED" || run.Status == "STOPPED" || run.Status == "FAILED" {
if run.Status == "COMPLETED" || run.Status == "STOPPED" || run.Status == "STOPPING" || run.Status == "FAILED" {
if downloadPath == "" {
downloadPath = run.SpaceName
if run.ProjectName != "" {
Expand Down
2 changes: 1 addition & 1 deletion cmd/output/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func init() {
}

func DownloadRunOutput(run *types.Run, nodes map[string]NodeInfo, files []string, destinationPath string) {
if run.Status != "COMPLETED" && run.Status != "STOPPED" && run.Status != "FAILED" {
if run.Status != "COMPLETED" && run.Status != "STOPPED" && run.Status != "STOPPING" && run.Status != "FAILED" {
fmt.Println("The workflow run hasn't been completed yet!")
fmt.Println("Run ID: " + run.ID.String() + " Status: " + run.Status)
return
Expand Down

0 comments on commit 18a2ca3

Please sign in to comment.