minor
This commit is contained in:
@ -113,7 +113,7 @@ class Cache:
|
||||
logging.error("ERROR @ %s: %s",
|
||||
__file__.rsplit("/", maxsplit=1)[-1], f"cache::store >> {str(e)}")
|
||||
await self.notifier.send(f"ERROR @ {__file__.rsplit("/", maxsplit=1)[-1]}",
|
||||
f"cache::store >> {str(e)}")
|
||||
f"cache::store >> `{str(e)}`")
|
||||
|
||||
async def sqlite_rowcount(self, where: Optional[str] = None,
|
||||
params: Optional[tuple] = None) -> int:
|
||||
|
@ -103,7 +103,7 @@ class Genius:
|
||||
|
||||
html = BeautifulSoup(htm.unescape(scrape_text).replace('<br/>', '\n'), "html.parser")
|
||||
|
||||
header_tags_genius: Optional[ResultSet] = html.find_all(class_=re.compile('.*Header.*'))
|
||||
header_tags_genius: Optional[ResultSet] = html.find_all(class_=re.compile(r'.*Header.*'))
|
||||
if header_tags_genius:
|
||||
for tag in header_tags_genius:
|
||||
tag.extract()
|
||||
|
@ -175,7 +175,7 @@ class RedisCache:
|
||||
search_res_out = [(out_id, search_res)]
|
||||
|
||||
if not search_res_out and self.notify_warnings:
|
||||
await self.notifier.send("WARNING", f"Redis cache miss for: \n## *{artist} - {song}*")
|
||||
await self.notifier.send("WARNING", f"Redis cache miss for: `{artist} - {song}`")
|
||||
return search_res_out
|
||||
except Exception as e:
|
||||
traceback.print_exc()
|
||||
@ -218,9 +218,9 @@ class RedisCache:
|
||||
logging.info("Stored %s - %s (related SQLite Row ID: %s) to %s",
|
||||
lyr_result.artist, lyr_result.song, sqlite_id, newkey)
|
||||
await self.notifier.send("INFO",
|
||||
f"Stored {lyr_result.artist} - {lyr_result.song} (related SQLite Row ID: {sqlite_id}) to redis: {newkey}")
|
||||
f"Stored `{lyr_result.artist} - {lyr_result.song}` (related SQLite Row ID: `{sqlite_id}`) to redis: `{newkey}`")
|
||||
except Exception as e:
|
||||
file: str = __file__.rsplit("/", maxsplit=1)[-1]
|
||||
await self.notifier.send(f"ERROR @ {file}",
|
||||
f"Failed to store {lyr_result.artist} - {lyr_result.song}\
|
||||
(SQLite id: {sqlite_id}) to Redis:\n{str(e)}")
|
||||
f"Failed to store `{lyr_result.artist} - {lyr_result.song}`\
|
||||
(SQLite id: `{sqlite_id}`) to Redis:\n`{str(e)}`")
|
Reference in New Issue
Block a user