mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 14:38:17 +08:00
remove pointless to_sym
This commit is contained in:
parent
f9ea5ab20b
commit
caa3cae535
|
@ -38,13 +38,13 @@ class DiscourseRedis
|
||||||
end
|
end
|
||||||
|
|
||||||
# Proxy key methods through, but prefix the keys with the namespace
|
# Proxy key methods through, but prefix the keys with the namespace
|
||||||
%w(append blpop brpop brpoplpush decr decrby del exists expire expireat get getbit getrange getset hdel
|
[:append, :blpop, :brpop, :brpoplpush, :decr, :decrby, :del, :exists, :expire, :expireat, :get, :getbit, :getrange, :getset,
|
||||||
hexists hget hgetall hincrby hincrbyfloat hkeys hlen hmget hmset hset hsetnx hvals incr incrby incrbyfloat
|
:hdel, :hexists, :hget, :hgetall, :hincrby, :hincrbyfloat, :hkeys, :hlen, :hmget, :hmset, :hset, :hsetnx, :hvals, :incr,
|
||||||
lindex linsert llen lpop lpush lpushx lrange lrem lset ltrim mget move mset msetnx persist pexpire pexpireat psetex
|
:incrby, :incrbyfloat, :lindex, :linsert, :llen, :lpop, :lpush, :lpushx, :lrange, :lrem, :lset, :ltrim, :mget, :move, :mset,
|
||||||
pttl rename renamenx rpop rpoplpush rpush rpushx sadd scard sdiff set setbit setex setnx setrange sinter
|
:msetnx, :persist, :pexpire, :pexpireat, :psetex, :pttl, :rename, :renamenx, :rpop, :rpoplpush, :rpush, :rpushx, :sadd, :scard,
|
||||||
sismember smembers sort spop srandmember srem strlen sunion ttl type watch zadd zcard zcount zincrby
|
:sdiff, :set, :setbit, :setex, :setnx, :setrange, :sinter, :sismember, :smembers, :sort, :spop, :srandmember, :srem, :strlen,
|
||||||
zrange zrangebyscore zrank zrem zremrangebyrank zremrangebyscore zrevrange zrevrangebyscore zrevrank zrangebyscore
|
:sunion, :ttl, :type, :watch, :zadd, :zcard, :zcount, :zincrby, :zrange, :zrangebyscore, :zrank, :zrem, :zremrangebyrank,
|
||||||
).map(&:to_sym).each do |m|
|
:zremrangebyscore, :zrevrange, :zrevrangebyscore, :zrevrank, :zrangebyscore].each do |m|
|
||||||
define_method m do |*args|
|
define_method m do |*args|
|
||||||
args[0] = "#{DiscourseRedis.namespace}:#{args[0]}"
|
args[0] = "#{DiscourseRedis.namespace}:#{args[0]}"
|
||||||
@redis.send(m, *args)
|
@redis.send(m, *args)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user