Closed Jibec closed 6 years ago
I think this a good catch!! :+1: When reading about it on Discourse forum, there have been some redis database "collisions" where Discourse just flushed the database 0, and some other apps were using it... So this helper is really an excellent idea! I read your helper, and the principle seems good, 2 small remarks:
/etc/redis.conf
As for the database deletion, I agree with you that provided apps use this helper, we can safely remove the database (and existing apps don't specify database, hence using database 0 which will never get removed).
But I'll definitely try to implement your helper in Discourse! And I didn't find a redis database parameter for wallabag2, but there's one for Nextcloud...
Thanks for your feedback, here is an improvement:
I don't know how to handle a situation where redis doesn't have any more database available, so I decided to trigger an error.
What to you think?
Here is the pull request: https://github.com/YunoHost-Apps/Experimental_helpers/pull/23 (please continue the conversation on the PR)
FYI, I started a Redis helper, I'm unsure this is useful to share together for now, please write here your thoughts about it.
I had to make sure two Funkwhale installation are not using the same redis database
https://github.com/YunoHost-Apps/funkwhale_ynh/pull/4 (the helper + usage
I assume if I remove the database and another app uses it, it will remove it's cache, how bad can it be?
Here is an example with discourse: https://github.com/discourse/discourse/blob/master/config/discourse_defaults.conf#L115 https://github.com/YunoHost-Apps/discourse_ynh/blob/master/scripts/install#L130