MCPcopy Create free account
hub / github.com/riverqueue/river / StateBitmask

Method StateBitmask

internal/dbunique/db_unique.go:39–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37}
38
39func (o *UniqueOpts) StateBitmask() byte {
40 states := uniqueOptsByStateDefault
41 if len(o.ByState) > 0 {
42 states = o.ByState
43 }
44 return uniquestates.UniqueStatesToBitmask(states)
45}
46
47func UniqueKey(timeGen rivertype.TimeGenerator, uniqueOpts *UniqueOpts, params *rivertype.JobInsertParams) ([]byte, error) {
48 uniqueKeyString, err := buildUniqueKeyString(timeGen, uniqueOpts, params)

Calls 1

UniqueStatesToBitmaskFunction · 0.92

Tested by 3

TestPeriodicJobEnqueuerFunction · 0.76