Skip to content

Commit 3c25af6

Browse files
authored
Fix issue with starting workload over API (#872)
When cleaning up some unused code, I deleted a necessary function call by mistake. This will reinstate it.
1 parent a309267 commit 3c25af6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/api/v1/workloads.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,14 @@ func (s *WorkloadRoutes) createWorkload(w http.ResponseWriter, r *http.Request)
283283
return
284284
}
285285

286+
// Start workload with specified RunConfig.
287+
err = s.manager.RunWorkloadDetached(runConfig)
288+
if err != nil {
289+
logger.Errorf("Failed to start workload: %v", err)
290+
http.Error(w, "Failed to start workload", http.StatusInternalServerError)
291+
return
292+
}
293+
286294
// Return name so that the client will get the auto-generated name.
287295
w.Header().Set("Content-Type", "application/json")
288296
w.WriteHeader(http.StatusCreated)

0 commit comments

Comments
 (0)