Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cobra.Command{ Use: "update-status", Short: "Update job status", Long: `Update job status of an existing job`, Example: ` wfxctl job update-status --id=1 --client-id=client42 --state=DOWNLOAD `, Run: func(cmd *cobra.Command, _ []string) { baseCmd := flags.NewBaseCmd() req := model.JobStatus{ ClientID: flags.Koanf.String(clientIDFlag), State: flags.Koanf.String(stateFlag), Progress: int32(flags.Koanf.Int(progressFlag)), Message: flags.Koanf.String(messageFlag), } cli := errutil.Must(baseCmd.CreateHTTPClient()) params := jobs.NewPutJobsIDStatusParams(). WithHTTPClient(cli). WithID(flags.Koanf.String(idFlag)). WithNewJobStatus(&req) var c *client.WorkflowExecutor if strings.ToUpper(flags.Koanf.String(actorFlag)) == string(model.EligibleEnumCLIENT) { c = baseCmd.CreateClient() } else { c = baseCmd.CreateMgmtClient() } resp, err := c.Jobs.PutJobsIDStatus(params) if err != nil { errutil.ProcessErrorResponse(cmd.OutOrStderr(), err) log.Fatal().Msg("Failed to update job") } log.Info().Str("id", params.ID).Str("state", req.State).Msg("Updated job status") if err := baseCmd.DumpResponse(cmd.OutOrStdout(), resp.GetPayload()); err != nil { log.Fatal().Err(err).Msg("Failed to dump response") } }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.