Redis fixes

This commit is contained in:
Fosco Marotto 2021-01-16 14:46:48 -05:00
parent 2cdce808a3
commit e44e83a857
1 changed files with 2 additions and 4 deletions

View File

@ -78,11 +78,9 @@ 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.with do |conn|
conn.keys('feed:*')
end
Redis.current.with do |conn| Redis.current.with do |conn|
keys = conn.keys('feed:*')
conn.pipelined do conn.pipelined do
keys.each { |key| conn.del(key) } keys.each { |key| conn.del(key) }
end end