minor
This commit is contained in:
parent
8080d858f8
commit
b15fab98b8
@ -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:
|
||||
"""
|
||||
|
@ -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)}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user