Attempts to acquire a distributed lock for the specified chat using Redis.
This method sets a lock key in Redis with a time-to-live (TTL) to prevent concurrent operations
on the same chat. If the lock is already held, it returns false and logs a warning.
If the lock is successfully acquired, it returns true.
In case of Redis errors, it logs the error and returns false.
Parameters
chatId: string
The unique identifier of the chat to lock.
Returns Promise<boolean>
A promise that resolves to true if the lock was acquired, or false otherwise.
Attempts to acquire a distributed lock for the specified chat using Redis.
This method sets a lock key in Redis with a time-to-live (TTL) to prevent concurrent operations on the same chat. If the lock is already held, it returns
falseand logs a warning. If the lock is successfully acquired, it returnstrue. In case of Redis errors, it logs the error and returnsfalse.