(ctx context.Context, jobChan chan *cleanerJob)
| 366 | } |
| 367 | |
| 368 | func (c *BlocksCleaner) runDeleteUserCleanup(ctx context.Context, jobChan chan *cleanerJob) { |
| 369 | for job := range jobChan { |
| 370 | if job.timestamp < time.Now().Add(-c.cfg.CleanupInterval).Unix() { |
| 371 | level.Warn(c.logger).Log("Delete users cleaner job too old. Ignoring to get recent data") |
| 372 | continue |
| 373 | } |
| 374 | err := c.cleanDeletedUsers(ctx, job.users) |
| 375 | |
| 376 | c.checkRunError(deletedStatus, err) |
| 377 | } |
| 378 | } |
| 379 | |
| 380 | func (c *BlocksCleaner) cleanDeletedUsers(ctx context.Context, users []string) error { |
| 381 | level.Info(c.logger).Log("msg", "started blocks cleanup and maintenance for deleted users") |
no test coverage detected