ShareInternally: Make stale short link expiry optional (#88137)
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com> Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> Co-authored-by: Irene Rodriguez <irene.rodriguez@grafana.com> Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
This commit is contained in:
co-authored by
Christopher Moyer
Isabel Matwawana
Irene Rodriguez
Jack Baldry
parent
7fba9ba522
commit
0a255ac5fb
@@ -103,12 +103,15 @@ func (srv *CleanUpService) clean(ctx context.Context) {
|
||||
{"delete expired images", srv.deleteExpiredImages},
|
||||
{"cleanup old annotations", srv.cleanUpOldAnnotations},
|
||||
{"expire old user invites", srv.expireOldUserInvites},
|
||||
{"delete stale short URLs", srv.deleteStaleShortURLs},
|
||||
{"delete stale query history", srv.deleteStaleQueryHistory},
|
||||
{"expire old email verifications", srv.expireOldVerifications},
|
||||
{"cleanup trash dashboards", srv.cleanUpTrashDashboards},
|
||||
}
|
||||
|
||||
if srv.Cfg.ShortLinkExpiration > 0 {
|
||||
cleanupJobs = append(cleanupJobs, cleanUpJob{"delete stale short URLs", srv.deleteStaleShortURLs})
|
||||
}
|
||||
|
||||
logger := srv.log.FromContext(ctx)
|
||||
logger.Debug("Starting cleanup jobs", "jobs", fmt.Sprintf("%v", cleanupJobs))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user