diff options
| author | 2020-05-31 13:43:42 -0700 | |
|---|---|---|
| committer | 2020-05-31 13:43:42 -0700 | |
| commit | ca1a8c55d68f15d910f21d568339e6555e4b7e54 (patch) | |
| tree | 09a4c943e7bd52dd29a50d4e0d5020097c7c11c7 | |
| parent | Add logging for the bad nickname filter (diff) | |
Remove redis namespace collision prevention
When cogs reload, it would consider their namespace as a conflict with
the original namespace. This feature will be removed as a fix until we
come up with a better solution.
Diffstat (limited to '')
| -rw-r--r-- | bot/utils/redis_cache.py | 11 | 
1 files changed, 1 insertions, 10 deletions
| diff --git a/bot/utils/redis_cache.py b/bot/utils/redis_cache.py index de80cee84..354e987b9 100644 --- a/bot/utils/redis_cache.py +++ b/bot/utils/redis_cache.py @@ -100,16 +100,7 @@ class RedisCache:      def _set_namespace(self, namespace: str) -> None:          """Try to set the namespace, but do not permit collisions.""" -        # We need a unique namespace, to prevent collisions. This loop -        # will try appending underscores to the end of the namespace until -        # it finds one that is unique. -        # -        # For example, if `john` and `john_`  are both taken, the namespace will -        # be `john__` at the end of this loop. -        while namespace in self._namespaces: -            namespace += "_" - -        log.trace(f"RedisCache setting namespace to {self._namespace}") +        log.trace(f"RedisCache setting namespace to {namespace}")          self._namespaces.append(namespace)          self._namespace = namespace | 
