saved searches: fix call to redis.exists?

https://github.com/redis/redis-rb/blob/master/CHANGELOG.md#421
This commit is contained in:
evazion
2020-06-19 12:13:56 -05:00
parent cd9e3e7f3d
commit 05f78f9bef
2 changed files with 3 additions and 3 deletions

View File

@@ -115,7 +115,7 @@ class SavedSearch < ApplicationRecord
def populate(query, timeout: 10_000)
redis_key = "search:#{query}"
return if redis.exists(redis_key)
return if redis.exists?(redis_key)
post_ids = Post.with_timeout(timeout, [], query: query) do
Post.system_tag_match(query).limit(QUERY_LIMIT).pluck(:id)