This commit is contained in:
codey 2025-02-16 06:53:41 -05:00
parent 8080d858f8
commit b15fab98b8
2 changed files with 4 additions and 3 deletions

View File

@ -8,6 +8,7 @@ import logging
import traceback
import time
import regex
from regex import Pattern
import datetime
import os
import gpt
@ -17,7 +18,7 @@ from typing import Union, Optional, LiteralString
from uuid import uuid4 as uuid
from .constructors import RadioException
double_space = regex.compile(r'\s{2,}')
double_space: Pattern = regex.compile(r'\s{2,}')
class RadioUtil:
"""

View File

@ -108,10 +108,10 @@ class RedisCache:
"""
try:
sources: list = ["cache", "lrclib", "genius", "failed"]
counts: dict = {}
counts: dict[str, int] = {}
for src in sources:
src_found_count = await self.redis_client.get(f"returned:{src}")
counts[src] = src_found_count
counts[src] = int(src_found_count) # Redis returns bytes
return counts
except Exception as e:
await self.notifier.send(f"ERROR @ {__file__.rsplit("/", maxsplit=1)[-1]}", f"{str(e)}")