MCPcopy Index your code
hub / github.com/riverqueue/river / Output

Method Output

rivertype/river_type.go:146–157  ·  view source on GitHub ↗

Output returns the previously recorded output for the job, if any. The return value is a raw JSON payload from the output that was recorded by the job, or nil if no output was recorded.

()

Source from the content-addressed store, hash-verified

144// value is a raw JSON payload from the output that was recorded by the job, or
145// nil if no output was recorded.
146func (j *JobRow) Output() []byte {
147 type metadataWithOutput struct {
148 Output json.RawMessage `json:"output"`
149 }
150
151 var metadata metadataWithOutput
152 if err := json.Unmarshal(j.Metadata, &metadata); err != nil {
153 return nil
154 }
155
156 return metadata.Output
157}
158
159// JobState is the state of a job. Jobs start their lifecycle as either
160// JobStateAvailable or JobStateScheduled, and if all goes well, transition to

Callers 4

TestJobRow_OutputFunction · 0.95
Test_Client_CommonFunction · 0.80
Test_Client_JobUpdateFunction · 0.80
Test_Client_JobUpdateTxFunction · 0.80

Calls

no outgoing calls

Tested by 4

TestJobRow_OutputFunction · 0.76
Test_Client_CommonFunction · 0.64
Test_Client_JobUpdateFunction · 0.64
Test_Client_JobUpdateTxFunction · 0.64