remove file path from notifications
This commit is contained in:
parent
e743a5186a
commit
fd31e8c16d
@ -59,7 +59,7 @@ class RedisCache:
|
|||||||
if str(result) != "OK":
|
if str(result) != "OK":
|
||||||
raise RedisException(f"Redis: Failed to create index: {result}")
|
raise RedisException(f"Redis: Failed to create index: {result}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
await self.notifier.send(f"ERROR @ {__file__}", f"Failed to create idx: {str(e)}")
|
await self.notifier.send(f"ERROR @ {__file__.rsplit("/", maxsplit=1)[-1]}", f"Failed to create idx: {str(e)}")
|
||||||
|
|
||||||
def sanitize_input(self, artist: str, song: str) -> tuple[str, str]:
|
def sanitize_input(self, artist: str, song: str) -> tuple[str, str]:
|
||||||
"""
|
"""
|
||||||
@ -120,7 +120,7 @@ class RedisCache:
|
|||||||
await self.notifier.send("WARNING", f"Redis cache miss for: \n## *{artist} - {song}*")
|
await self.notifier.send("WARNING", f"Redis cache miss for: \n## *{artist} - {song}*")
|
||||||
return search_res_out
|
return search_res_out
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
await self.notifier.send(f"ERROR @ {__file__}", f"{str(e)}\nSearch was: {artist} - {song}")
|
await self.notifier.send(f"ERROR @ {__file__.rsplit("/", maxsplit=1)[-1]}", f"{str(e)}\nSearch was: {artist} - {song}")
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
|
|
||||||
async def redis_store(self, sqlite_id: int, lyr_result: LyricsResult) -> None:
|
async def redis_store(self, sqlite_id: int, lyr_result: LyricsResult) -> None:
|
||||||
@ -155,6 +155,6 @@ class RedisCache:
|
|||||||
await self.notifier.send("INFO",
|
await self.notifier.send("INFO",
|
||||||
f"Stored {lyr_result.artist} - {lyr_result.song} (related SQLite Row ID: {sqlite_id}) to {newkey}")
|
f"Stored {lyr_result.artist} - {lyr_result.song} (related SQLite Row ID: {sqlite_id}) to {newkey}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
await self.notifier.send(f"ERROR @ {__file__}",
|
await self.notifier.send(f"ERROR @ {__file__.rsplit("/", maxsplit=1)[-1]}",
|
||||||
f"Failed to store {lyr_result.artist} - {lyr_result.song}\
|
f"Failed to store {lyr_result.artist} - {lyr_result.song}\
|
||||||
(SQLite id: {sqlite_id}) to Redis:\n{str(e)}")
|
(SQLite id: {sqlite_id}) to Redis:\n{str(e)}")
|
Loading…
x
Reference in New Issue
Block a user