1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/paperless-ngx_ynh.git synced 2024-09-03 19:56:33 +02:00

ynh_redis_remove_db should remove only the current database

flushall remove all databases so we need to use flushdb which remove all keys from the current database as you can see below.

$ redis-cli
127.0.0.1:6379> help FLUSHALL
  FLUSHALL [ASYNC]
  summary: Remove all keys from all databases
  since: 1.0.0
  group: server
127.0.0.1:6379> help FLUSHDB
  FLUSHDB [ASYNC]
  summary: Remove all keys from the current database
  since: 1.0.0
  group: server
This commit is contained in:
Patrick Brisacier 2024-04-12 21:23:55 +02:00 committed by GitHub
parent d5eed52410
commit b39d46f4c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -35,5 +35,5 @@ ynh_redis_get_free_db() {
# | arg: database - the database to erase # | arg: database - the database to erase
ynh_redis_remove_db() { ynh_redis_remove_db() {
local db=$1 local db=$1
redis-cli -n "$db" flushall redis-cli -n "$db" flushdb
} }