From e8e7f81593c9314be22b5513b40a4e4b75391200 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Mon, 21 Jul 2025 16:25:27 +0530 Subject: [PATCH] Clean up old link history --- server/cmd/museum/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/cmd/museum/main.go b/server/cmd/museum/main.go index 3e08aeb253..17c7b5ba42 100644 --- a/server/cmd/museum/main.go +++ b/server/cmd/museum/main.go @@ -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() {