minor
This commit is contained in:
@ -125,7 +125,12 @@ class Misc(FastAPI):
|
||||
"""
|
||||
|
||||
np: dict = self.radio.radio_util.now_playing
|
||||
artistsong: str = np.get("artistsong", "N/A - N/A")
|
||||
artistsong: str = "N/A - N/A"
|
||||
artist = np.get("artist")
|
||||
song = np.get("song")
|
||||
if artist and song:
|
||||
artistsong = f"{artist} - {song}"
|
||||
|
||||
album: str = np.get("album", "N/A")
|
||||
genre: str = np.get("genre", "N/A")
|
||||
return (artistsong, album, genre)
|
||||
@ -143,10 +148,6 @@ class Misc(FastAPI):
|
||||
# End response time test
|
||||
total_keys = await self.redis_client.dbsize()
|
||||
response_time: float = time_end - time_start
|
||||
(_, ci_keys) = await self.redis_client.scan(
|
||||
cursor=0, match="ci_session*", count=10000000
|
||||
)
|
||||
num_ci_keys = len(ci_keys)
|
||||
index_info = await self.redis_client.ft().info()
|
||||
indexed_lyrics: int = index_info.get("num_docs")
|
||||
return JSONResponse(
|
||||
@ -154,7 +155,7 @@ class Misc(FastAPI):
|
||||
"responseTime": round(response_time, 7),
|
||||
"storedKeys": total_keys,
|
||||
"indexedLyrics": indexed_lyrics,
|
||||
"sessions": num_ci_keys,
|
||||
"sessions": -1,
|
||||
}
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user