more logging
This commit is contained in:
		
							
								
								
									
										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
 | 
			
		||||
        copyright_tags = post.tags.copyright
 | 
			
		||||
        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>',
 | 
			
		||||
            character_tags and f'Character: <b>{format_tags(character_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)
 | 
			
		||||
            except Exception as e:
 | 
			
		||||
                logging.exception(e)
 | 
			
		||||
        else:
 | 
			
		||||
            logging.warning('Not sending because url is None')
 | 
			
		||||
    except Exception as e:
 | 
			
		||||
        logging.exception(e)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user