Update feeds_cli.rb redis
This commit is contained in:
parent
2e8b7125d9
commit
da98d61c2c
|
@ -78,12 +78,15 @@ module GabSocial
|
||||||
|
|
||||||
desc 'clear', 'Remove all home and list feeds from Redis'
|
desc 'clear', 'Remove all home and list feeds from Redis'
|
||||||
def clear
|
def clear
|
||||||
keys = Redis.current.keys('feed:*')
|
keys = Redis.current.with do |conn|
|
||||||
|
conn.keys('feed:*')
|
||||||
Redis.current.pipelined do
|
|
||||||
keys.each { |key| Redis.current.del(key) }
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Redis.current.with do |conn|
|
||||||
|
conn.pipelined do
|
||||||
|
keys.each { |key| conn.del(key) }
|
||||||
|
end
|
||||||
|
end
|
||||||
say('OK', :green)
|
say('OK', :green)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue