Update feeds_cli.rb redis

This commit is contained in:
admin 2021-01-16 18:42:03 +00:00
parent 2e8b7125d9
commit da98d61c2c
1 changed files with 7 additions and 4 deletions

View File

@ -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