mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-22 00:44:10 +00:00
Updated with current state, fixed irc crash on bytes (non-critical)
This commit is contained in:
parent
92d39d451c
commit
9255238389
|
@ -1146,7 +1146,8 @@ async def embed_formatter(action, change, parsed_comment, categories, recent_cha
|
|||
tag_displayname.append(additional_data["tags"][tag])
|
||||
else:
|
||||
tag_displayname.append(tag)
|
||||
embed.add_field(_("Tags"), ", ".join(tag_displayname))
|
||||
if tag_displayname:
|
||||
embed.add_field(_("Tags"), ", ".join(tag_displayname))
|
||||
if len(embed["title"]) > 254:
|
||||
embed["title"] = embed["title"][0:253]+"…"
|
||||
logger.debug("Current params in edit action: {}".format(change))
|
||||
|
|
|
@ -65,6 +65,8 @@ class AioIRCCat(irc.client_aio.AioSimpleIRCClient):
|
|||
logger.warning("Seems like we have invalid JSON in Discussions part, message: {}".format(message))
|
||||
return
|
||||
if post.get('action', 'unknown') != "deleted": # ignore deletion events
|
||||
if isinstance(post.get('url'), bytes):
|
||||
return
|
||||
url = urlparse(post.get('url'))
|
||||
full_url ="https://"+ url.netloc + recognize_langs(url.path)
|
||||
if full_url in self.wikis: # POSSIBLE MEMORY LEAK AS WE DON'T HAVE A WAY TO CHECK IF WIKI IS LOOKING FOR DISCUSSIONS OR NOT
|
||||
|
|
|
@ -89,7 +89,7 @@ class Wiki:
|
|||
async def fail_add(self, wiki_url, status):
|
||||
logger.debug("Increasing fail_times to {}".format(self.fail_times+3))
|
||||
self.fail_times += 3
|
||||
if self.fail_times > 9:
|
||||
if self.fail_times > 120:
|
||||
await self.remove(wiki_url, status)
|
||||
|
||||
async def check_status(self, wiki_url, status):
|
||||
|
|
Loading…
Reference in a new issue