()
| 51 | } |
| 52 | |
| 53 | func (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. |
no test coverage detected