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

Method mustValidate

internal/maintenance/queue_cleaner.go:53–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51}
52
53func (c *QueueCleanerConfig) mustValidate() *QueueCleanerConfig {
54 c.MustValidate()
55
56 if c.Interval <= 0 {
57 panic("QueueCleanerConfig.Interval must be above zero")
58 }
59 if c.RetentionPeriod <= 0 {
60 panic("QueueCleanerConfig.RetentionPeriod must be above zero")
61 }
62
63 return c
64}
65
66// QueueCleaner periodically removes queues from the river_queue table that have
67// not been updated in a while, indicating that they are no longer active.

Callers 1

NewQueueCleanerFunction · 0.45

Calls 1

MustValidateMethod · 0.80

Tested by

no test coverage detected