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

Function MetadataUpdatesFromWorkContext

internal/jobexecutor/job_executor.go:71–81  ·  view source on GitHub ↗

MetadataUpdatesFromWorkContext returns the metadata updates stored in the work context, if any. When run on a non-work context, it returns nil, false.

(ctx context.Context)

Source from the content-addressed store, hash-verified

69//
70// When run on a non-work context, it returns nil, false.
71func MetadataUpdatesFromWorkContext(ctx context.Context) (map[string]any, bool) {
72 metadataUpdates := ctx.Value(ContextKeyMetadataUpdates)
73 if metadataUpdates == nil {
74 return nil, false
75 }
76 typedMetadataUpdates, ok := metadataUpdates.(map[string]any)
77 if !ok {
78 return nil, false
79 }
80 return typedMetadataUpdates, true
81}
82
83type jobExecutorResult struct {
84 Err error

Callers 8

resumableSetStepTxFunction · 0.92
MetadataSetFunction · 0.92
JobCompleteTxFunction · 0.92
TestResumableSetStepTxFunction · 0.92
RecordOutputFunction · 0.92
jobUpdateMethod · 0.92
WorkMethod · 0.92
WorkMethod · 0.92

Calls 1

ValueMethod · 0.45

Tested by 1

TestResumableSetStepTxFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…