Clean up old link history
This commit is contained in:
@@ -800,7 +800,7 @@ func main() {
|
||||
setKnownAPIs(server.Routes())
|
||||
setupAndStartBackgroundJobs(objectCleanupController, replicationController3, fileDataCtrl)
|
||||
setupAndStartCrons(
|
||||
userAuthRepo, collectionLinkRepo, twoFactorRepo, passkeysRepo, fileController, taskLockingRepo, emailNotificationCtrl,
|
||||
userAuthRepo, collectionLinkRepo, fileLinkRepo, twoFactorRepo, passkeysRepo, fileController, taskLockingRepo, emailNotificationCtrl,
|
||||
trashController, pushController, objectController, dataCleanupController, storageBonusCtrl, emergencyCtrl,
|
||||
embeddingController, healthCheckHandler, kexCtrl, castDb)
|
||||
|
||||
@@ -930,6 +930,7 @@ func setupAndStartBackgroundJobs(
|
||||
}
|
||||
|
||||
func setupAndStartCrons(userAuthRepo *repo.UserAuthRepository, collectionLinkRepo *public.CollectionLinkRepo,
|
||||
fileLinkRepo *public.FileLinkRepository,
|
||||
twoFactorRepo *repo.TwoFactorRepository, passkeysRepo *passkey.Repository, fileController *controller.FileController,
|
||||
taskRepo *repo.TaskLockRepository, emailNotificationCtrl *email.EmailNotificationController,
|
||||
trashController *controller.TrashController, pushController *controller.PushController,
|
||||
@@ -956,6 +957,7 @@ func setupAndStartCrons(userAuthRepo *repo.UserAuthRepository, collectionLinkRep
|
||||
_ = userAuthRepo.RemoveDeletedTokens(timeUtil.MicrosecondsBeforeDays(30))
|
||||
_ = castDb.DeleteOldSessions(context.Background(), timeUtil.MicrosecondsBeforeDays(7))
|
||||
_ = collectionLinkRepo.CleanupAccessHistory(context.Background())
|
||||
_ = fileLinkRepo.CleanupAccessHistory(context.Background())
|
||||
})
|
||||
|
||||
schedule(c, "@every 1m", func() {
|
||||
|
||||
Reference in New Issue
Block a user