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

Method First

job_list_params.go:313–323  ·  view source on GitHub ↗

First returns an updated filter set that will only return the first count jobs. Count must be between 1 and 10_000, inclusive, or this will panic.

(count int)

Source from the content-addressed store, hash-verified

311//
312// Count must be between 1 and 10_000, inclusive, or this will panic.
313func (p *JobListParams) First(count int) *JobListParams {
314 if count <= 0 {
315 panic("count must be > 0")
316 }
317 if count > 10_000 {
318 panic("count must be <= 10_000")
319 }
320 paramsCopy := p.copy()
321 paramsCopy.limit = int32(count)
322 return paramsCopy
323}
324
325// IDs returns an updated filter set that will only return jobs with the given
326// IDs.

Callers 1

Test_Client_QueueListFunction · 0.45

Calls 1

copyMethod · 0.95

Tested by 1

Test_Client_QueueListFunction · 0.36