mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 09:42:02 +08:00
DEV: Fix redis.sadd
warnings (#23244)
``` Redis#sadd will always return an Integer in Redis 5.0.0. Use Redis#sadd? instead ```
This commit is contained in:
parent
09acba17de
commit
09446baf10
|
@ -41,7 +41,7 @@ class CommonPasswords
|
|||
|
||||
def self.load_passwords
|
||||
passwords = File.readlines(PASSWORD_FILE)
|
||||
redis.sadd LIST_KEY, passwords.map!(&:chomp)
|
||||
redis.sadd?(LIST_KEY, passwords.map!(&:chomp))
|
||||
rescue Errno::ENOENT
|
||||
# tolerate this so we don't block signups
|
||||
Rails.logger.error "Common passwords file #{PASSWORD_FILE} is not found! Common password checking is skipped."
|
||||
|
|
|
@ -132,7 +132,7 @@ RSpec.describe BackupRestore::SystemInterface do
|
|||
key = "#{hostname}:#{pid}"
|
||||
process = { pid: pid, hostname: hostname }
|
||||
|
||||
conn.sadd("processes", key)
|
||||
conn.sadd?("processes", key)
|
||||
conn.hmset(key, "info", Sidekiq.dump_json(process))
|
||||
|
||||
data =
|
||||
|
|
Loading…
Reference in New Issue
Block a user