feat: set lock timeout to 1 second (#8661)

This commit is contained in:
Shivam Mishra
2024-01-12 08:28:07 +05:30
committed by GitHub
parent 1c44445088
commit 10076c6a3e
2 changed files with 4 additions and 4 deletions

View File

@@ -12,10 +12,10 @@
# end
#
class Redis::LockManager
# Default lock timeout set to 2 seconds. This means that if the lock isn't released
# within 2 seconds, it will automatically expire.
# Default lock timeout set to 1 second. This means that if the lock isn't released
# within 1 second, it will automatically expire.
# This helps to avoid deadlocks in case the process holding the lock crashes or fails to release it.
LOCK_TIMEOUT = 2.seconds
LOCK_TIMEOUT = 1.second
# Attempts to acquire a lock for the given key.
#