(ctx context.Context, jobChan <-chan *cleanerJob)
| 331 | } |
| 332 | |
| 333 | func (c *BlocksCleaner) runActiveUserCleanup(ctx context.Context, jobChan <-chan *cleanerJob) { |
| 334 | for job := range jobChan { |
| 335 | if job.timestamp < time.Now().Add(-c.cfg.CleanupInterval).Unix() { |
| 336 | level.Warn(c.logger).Log("msg", "Active user cleaner job too old. Ignoring to get recent data") |
| 337 | continue |
| 338 | } |
| 339 | err := c.cleanUpActiveUsers(ctx, job.users, false) |
| 340 | |
| 341 | c.checkRunError(activeStatus, err) |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | func (c *BlocksCleaner) cleanUpActiveUsers(ctx context.Context, users []string, firstRun bool) error { |
| 346 | level.Info(c.logger).Log("msg", "started blocks cleanup and maintenance for active users") |
no test coverage detected