mirror of
https://github.com/ente-io/ente.git
synced 2025-08-08 07:28:26 +00:00
[server] Slow down crons
This commit is contained in:
parent
a7cc96d994
commit
a8c7dd52ba
@ -893,14 +893,14 @@ func setupAndStartCrons(userAuthRepo *repo.UserAuthRepository, publicCollectionR
|
||||
}
|
||||
})
|
||||
|
||||
schedule(c, "@every 2m", func() {
|
||||
schedule(c, "@every 10m", func() {
|
||||
fileController.CleanupDeletedFiles()
|
||||
})
|
||||
schedule(c, "@every 101s", func() {
|
||||
embeddingCtrl.CleanupDeletedEmbeddings()
|
||||
})
|
||||
|
||||
schedule(c, "@every 10m", func() {
|
||||
schedule(c, "@every 17m", func() {
|
||||
trashController.DropFileMetadataCron()
|
||||
})
|
||||
|
||||
@ -926,7 +926,7 @@ func setupAndStartCrons(userAuthRepo *repo.UserAuthRepository, publicCollectionR
|
||||
trashController.ProcessEmptyTrashRequests()
|
||||
})
|
||||
|
||||
schedule(c, "@every 30m", func() {
|
||||
schedule(c, "@every 45m", func() {
|
||||
// delete unclaimed codes older than 60 minutes
|
||||
_ = castDb.DeleteUnclaimedCodes(context.Background(), timeUtil.MicrosecondsBeforeMinutes(60))
|
||||
dataCleanupCtrl.DeleteDataCron()
|
||||
|
@ -689,7 +689,7 @@ func (c *FileController) CleanupDeletedFiles() {
|
||||
defer func() {
|
||||
c.LockController.ReleaseLock(DeletedObjectQueueLock)
|
||||
}()
|
||||
items, err := c.QueueRepo.GetItemsReadyForDeletion(repo.DeleteObjectQueue, 2000)
|
||||
items, err := c.QueueRepo.GetItemsReadyForDeletion(repo.DeleteObjectQueue, 1000)
|
||||
if err != nil {
|
||||
log.WithError(err).Error("Failed to fetch items from queue")
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user