Chatwoot/lib/redis/alfred.rb

30 lines
536 B
Ruby
Raw Normal View History

module Redis::Alfred
CONVERSATION_MAILER_KEY = 'CONVERSATION::%d'.freeze
class << self
def rpoplpush(source, destination)
$alfred.rpoplpush(source, destination)
end
2019-10-20 08:47:26 +00:00
def lpush(key, value)
$alfred.lpush(key, value)
end
def delete(key)
$alfred.del(key)
end
2019-10-20 08:47:26 +00:00
def lrem(key, value, count = 0)
$alfred.lrem(key, count, value)
end
def setex(key, value, expiry = 1.day)
$alfred.setex(key, expiry, value)
end
def get(key)
$alfred.get(key)
end
end
end