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

Method AddManySafely

periodic_job.go:167–169  ·  view source on GitHub ↗

AddManySafely is the same as AddMany, but it returns an error in the case of a validation problem or duplicate ID instead of panicking.

(periodicJobs []*PeriodicJob)

Source from the content-addressed store, hash-verified

165// AddManySafely is the same as AddMany, but it returns an error in the case of
166// a validation problem or duplicate ID instead of panicking.
167func (b *PeriodicJobBundle) AddManySafely(periodicJobs []*PeriodicJob) ([]rivertype.PeriodicJobHandle, error) {
168 return b.periodicJobEnqueuer.AddManySafely(sliceutil.Map(periodicJobs, b.mapper.toInternal))
169}
170
171// Clear clears all periodic jobs, cancelling all scheduled runs.
172//

Callers 2

AddManyMethod · 0.45
TestPeriodicJobBundleFunction · 0.45

Calls 1

MapFunction · 0.92

Tested by 1

TestPeriodicJobBundleFunction · 0.36