Skip to content

Commit 73b5e7c

Browse files
authored
Insert calls to track status (#1031)
Modify `workloads.Manager` to create, set and delete workload statuses in the appropriate places. Note that these operations are no-ops, and there are no calls to fetch the state yet. This will be added in the next PR.
1 parent 0fc85f4 commit 73b5e7c

File tree

8 files changed

+237
-178
lines changed

8 files changed

+237
-178
lines changed

cmd/thv/app/run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ func runCmdFunc(cmd *cobra.Command, args []string) error {
395395
if runForeground {
396396
return workloadManager.RunWorkload(ctx, runConfig)
397397
}
398-
return workloadManager.RunWorkloadDetached(runConfig)
398+
return workloadManager.RunWorkloadDetached(ctx, runConfig)
399399
}
400400

401401
// parseCommandArguments processes command-line arguments to find everything after the -- separator

docs/server/docs.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/server/swagger.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/server/swagger.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/api/v1/workloads.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ func (s *WorkloadRoutes) createWorkload(w http.ResponseWriter, r *http.Request)
279279
}
280280

281281
// Start workload with specified RunConfig.
282-
err = s.workloadManager.RunWorkloadDetached(runConfig)
282+
err = s.workloadManager.RunWorkloadDetached(ctx, runConfig)
283283
if err != nil {
284284
logger.Errorf("Failed to start workload: %v", err)
285285
http.Error(w, "Failed to start workload", http.StatusInternalServerError)

0 commit comments

Comments
 (0)