remove db parameters from config
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 7s

maybe that's causing issues??
This commit is contained in:
Nexus 2024-05-05 02:48:54 +01:00
parent 51a3faed25
commit 5e14c2bd90
Signed by: nex
GPG key ID: 0FA334385D0B689F
3 changed files with 4 additions and 4 deletions

View file

@ -265,7 +265,7 @@ class ChatHistory:
def __init__(self): def __init__(self):
self._internal = {} self._internal = {}
self.log = logging.getLogger("jimmy.cogs.ollama.history") self.log = logging.getLogger("jimmy.cogs.ollama.history")
self.redis = redis.Redis(**CONFIG["redis"], db="jimmy-v2-ollama") self.redis = redis.Redis(**CONFIG["redis"])
def load_thread(self, thread_id: str): def load_thread(self, thread_id: str):
value: str = self.redis.get("threads:" + thread_id) value: str = self.redis.get("threads:" + thread_id)

View file

@ -16,7 +16,7 @@ class Starboard(commands.Cog):
self.config = CONFIG["starboard"] self.config = CONFIG["starboard"]
self.emoji = discord.PartialEmoji.from_str(self.config.get("emoji", "\N{white medium star}")) self.emoji = discord.PartialEmoji.from_str(self.config.get("emoji", "\N{white medium star}"))
self.log = logging.getLogger("jimmy.cogs.starboard") self.log = logging.getLogger("jimmy.cogs.starboard")
self.redis = Redis(**CONFIG["redis"], db="jimmy-v2-starboard") self.redis = Redis(**CONFIG["redis"])
async def generate_starboard_embed(self, message: discord.Message) -> tuple[discord.Embed, int]: async def generate_starboard_embed(self, message: discord.Message) -> tuple[discord.Embed, int]:
""" """

View file

@ -45,8 +45,8 @@ CONFIG.setdefault("quote_a", {"channel": None})
CONFIG.setdefault("redis", {"host": "redis", "port": 6379, "decode_responses": True}) CONFIG.setdefault("redis", {"host": "redis", "port": 6379, "decode_responses": True})
CONFIG.setdefault("starboard", {}) CONFIG.setdefault("starboard", {})
if CONFIG["redis"].pop("db", None) is not None: # if CONFIG["redis"].pop("db", None) is not None:
log.warning("`redis.db` cannot be manually specified, each cog that uses redis has its own db value! Value ignored") # log.warning("`redis.db` cannot be manually specified, each cog that uses redis has its own db value! Value ignored")
if CONFIG["redis"].pop("no_ping", None) is not None: if CONFIG["redis"].pop("no_ping", None) is not None:
log.warning("`redis.no_ping` was deprecated after 808D621F. Ping is now always mandatory.") log.warning("`redis.no_ping` was deprecated after 808D621F. Ping is now always mandatory.")