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:
Jarek Radosz 2023-08-28 06:58:47 +02:00 committed by GitHub
parent 09acba17de
commit 09446baf10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

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

View File

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