more logging
This commit is contained in:
parent
fa754bfd76
commit
e51f32c25a
4
main.py
4
main.py
@ -52,7 +52,7 @@ async def send_post(post: E621Post, tag_list: List[str]):
|
|||||||
character_tags = post.tags.character
|
character_tags = post.tags.character
|
||||||
copyright_tags = post.tags.copyright
|
copyright_tags = post.tags.copyright
|
||||||
caption = '\n'.join(l for l in [
|
caption = '\n'.join(l for l in [
|
||||||
f'Monitored tags: <b>{format_tags(monitored_tags) or "None"}</b>',
|
f'Monitored tags: <b>{format_tags(monitored_tags)}</b>',
|
||||||
artist_tags and f'Artist: <b>{format_tags(artist_tags)}</b>',
|
artist_tags and f'Artist: <b>{format_tags(artist_tags)}</b>',
|
||||||
character_tags and f'Character: <b>{format_tags(character_tags)}</b>',
|
character_tags and f'Character: <b>{format_tags(character_tags)}</b>',
|
||||||
copyright_tags and f'Copyright: <b>{format_tags(copyright_tags)}</b>',
|
copyright_tags and f'Copyright: <b>{format_tags(copyright_tags)}</b>',
|
||||||
@ -118,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)
|
||||||
|
else:
|
||||||
|
logging.warning('Not sending because url is None')
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.exception(e)
|
logging.exception(e)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user