2020-07-07 18:44:07 +00:00
|
|
|
module Redis::RedisKeys
|
2020-11-25 08:29:38 +00:00
|
|
|
## Inbox Keys
|
|
|
|
# Array storing the ordered ids for agent round robin assignment
|
2020-07-07 18:44:07 +00:00
|
|
|
ROUND_ROBIN_AGENTS = 'ROUND_ROBIN_AGENTS:%<inbox_id>d'.freeze
|
|
|
|
|
2020-11-25 08:29:38 +00:00
|
|
|
## Conversation keys
|
|
|
|
# Detect whether to send an email reply to the conversation
|
2020-07-07 18:44:07 +00:00
|
|
|
CONVERSATION_MAILER_KEY = 'CONVERSATION::%<conversation_id>d'.freeze
|
2020-11-25 08:29:38 +00:00
|
|
|
# Whether a conversation is muted ?
|
|
|
|
CONVERSATION_MUTE_KEY = 'CONVERSATION::%<id>d::MUTED'.freeze
|
|
|
|
|
|
|
|
## User Keys
|
|
|
|
# SSO Auth Tokens
|
|
|
|
USER_SSO_AUTH_TOKEN = 'USER_SSO_AUTH_TOKEN::%<user_id>d::%<token>s'.freeze
|
2020-07-07 18:44:07 +00:00
|
|
|
|
|
|
|
## Online Status Keys
|
|
|
|
# hash containing user_id key and status as value
|
|
|
|
ONLINE_STATUS = 'ONLINE_STATUS::%<account_id>d'.freeze
|
|
|
|
# sorted set storing online presense of account contacts
|
|
|
|
ONLINE_PRESENCE_CONTACTS = 'ONLINE_PRESENCE::%<account_id>d::CONTACTS'.freeze
|
|
|
|
# sorted set storing online presense of account users
|
|
|
|
ONLINE_PRESENCE_USERS = 'ONLINE_PRESENCE::%<account_id>d::USERS'.freeze
|
2020-09-29 19:42:32 +00:00
|
|
|
|
|
|
|
## Authorization Status Keys
|
2020-11-25 08:29:38 +00:00
|
|
|
# Used to track token expiry and such issues for facebook slack integrations etc
|
2020-09-29 19:42:32 +00:00
|
|
|
AUTHORIZATION_ERROR_COUNT = 'AUTHORIZATION_ERROR_COUNT:%<obj_type>s:%<obj_id>d'.freeze
|
|
|
|
REAUTHORIZATION_REQUIRED = 'REAUTHORIZATION_REQUIRED:%<obj_type>s:%<obj_id>d'.freeze
|
2020-07-07 18:44:07 +00:00
|
|
|
end
|