more logging

This commit is contained in:
bakatrouble 2023-11-03 15:37:23 +03:00
parent e4523b5cb8
commit fa754bfd76

View File

@ -44,6 +44,7 @@ def format_tags(tags: Iterable[str]):
async def send_post(post: E621Post, tag_list: List[str]): async def send_post(post: E621Post, tag_list: List[str]):
try:
logging.warning(f'Sending post #{post.id}') logging.warning(f'Sending post #{post.id}')
await bot.send_chat_action(int(os.environ['SEND_CHAT']), action=ChatAction.TYPING) await bot.send_chat_action(int(os.environ['SEND_CHAT']), action=ChatAction.TYPING)
monitored_tags = set(post.tags.flatten()) & set(tag_list) monitored_tags = set(post.tags.flatten()) & set(tag_list)
@ -117,6 +118,8 @@ async def send_post(post: E621Post, tag_list: List[str]):
await redis.sadd('e621:sent', post.id) await redis.sadd('e621:sent', post.id)
except Exception as e: except Exception as e:
logging.exception(e) logging.exception(e)
except Exception as e:
logging.exception(e)
async def check_updates(): async def check_updates():