Reduce lock duration

This commit is contained in:
Neeraj Gupta 2024-03-11 10:36:50 +05:30 committed by Neeraj Gupta
parent e667eef951
commit 89d761a096
2 changed files with 2 additions and 2 deletions

View file

@ -605,7 +605,7 @@ func (c *FileController) CleanupDeletedFiles() {
c.cleanupCronRunning = false
}()
lockStatus := c.LockController.TryLock(DeletedObjectQueueLock, time.MicrosecondsAfterHours(24))
lockStatus := c.LockController.TryLock(DeletedObjectQueueLock, time.MicrosecondsAfterHours(2))
if !lockStatus {
log.Warning(fmt.Sprintf("Failed to acquire lock %s", DeletedObjectQueueLock))
return

View file

@ -55,7 +55,7 @@ func (c *ObjectController) RemoveComplianceHolds() {
c.complianceCronRunning = false
}()
lockStatus := c.LockController.TryLock(RemoveComplianceHoldsLock, time.MicrosecondsAfterHours(24))
lockStatus := c.LockController.TryLock(RemoveComplianceHoldsLock, time.MicrosecondsAfterHours(2))
if !lockStatus {
log.Warning(fmt.Sprintf("Failed to acquire lock %s", RemoveComplianceHoldsLock))
return