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

Function NewWorkers

worker.go:158–162  ·  view source on GitHub ↗

NewWorkers initializes a new registry of available job workers. Use the top-level AddWorker function combined with a Workers registry to register each available worker.

()

Source from the content-addressed store, hash-verified

156// Use the top-level AddWorker function combined with a Workers registry to
157// register each available worker.
158func NewWorkers() *Workers {
159 return &Workers{
160 workersMap: make(map[string]workerInfo),
161 }
162}
163
164func (w Workers) add(jobArgs JobArgs, workUnitFactory workunit.WorkUnitFactory) error {
165 checkRegistered := func(kind string) error {

Callers 15

Example_uniqueJobFunction · 0.92
Example_jobArgsHooksFunction · 0.92
Example_jobSnoozeFunction · 0.92
Example_subscriptionFunction · 0.92
Example_insertAndWorkFunction · 0.92
Example_periodicJobFunction · 0.92
Example_cronJobFunction · 0.92
Example_batchInsertFunction · 0.92
Example_resumableCursorFunction · 0.92

Calls

no outgoing calls

Tested by 15

Example_uniqueJobFunction · 0.74
Example_jobArgsHooksFunction · 0.74
Example_jobSnoozeFunction · 0.74
Example_subscriptionFunction · 0.74
Example_insertAndWorkFunction · 0.74
Example_periodicJobFunction · 0.74
Example_cronJobFunction · 0.74
Example_batchInsertFunction · 0.74
Example_resumableCursorFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…