MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / jobDebugBlockAttachmentRun

Function jobDebugBlockAttachmentRun

cmd/wsh/cmd/wshcmd-jobdebug.go:430–448  ·  view source on GitHub ↗
(cmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

428}
429
430func jobDebugBlockAttachmentRun(cmd *cobra.Command, args []string) error {
431 blockORef, err := resolveBlockArg()
432 if err != nil {
433 return err
434 }
435
436 blockId := blockORef.OID
437 jobStatus, err := wshclient.BlockJobStatusCommand(RpcClient, blockId, &wshrpc.RpcOpts{Timeout: 5000})
438 if err != nil {
439 return fmt.Errorf("getting block job status: %w", err)
440 }
441
442 if jobStatus.JobId == "" {
443 fmt.Printf("Block %s: no attached job\n", blockId)
444 } else {
445 fmt.Printf("Block %s: attached to job %s\n", blockId, jobStatus.JobId)
446 }
447 return nil
448}

Callers

nothing calls this directly

Calls 2

BlockJobStatusCommandFunction · 0.92
resolveBlockArgFunction · 0.85

Tested by

no test coverage detected