feat: implement mutex for SlackSendJob (#7783)

This commit is contained in:
Shivam Mishra
2023-08-25 11:58:29 +07:00
committed by GitHub
parent 64ae9f625a
commit 5598b4b27e
6 changed files with 121 additions and 54 deletions

View File

@@ -37,4 +37,5 @@ module Redis::RedisKeys
## Sempahores / Locks
# We don't want to process messages from the same sender concurrently to prevent creating double conversations
FACEBOOK_MESSAGE_MUTEX = 'FB_MESSAGE_CREATE_LOCK::%<sender_id>s::%<recipient_id>s'.freeze
SLACK_MESSAGE_MUTEX = 'SLACK_MESSAGE_LOCK::%<sender_id>s::%<reference_id>s'.freeze
end