mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Moved error handling for one thing since I want to handle it separately
This commit is contained in:
parent
7808c4b47d
commit
75a865287f
|
@ -227,8 +227,6 @@ async def scan_group(group: str):
|
||||||
await local_wiki.fail_add(queued_wiki.url, 410)
|
await local_wiki.fail_add(queued_wiki.url, 410)
|
||||||
continue
|
continue
|
||||||
raise WikiError
|
raise WikiError
|
||||||
recent_changes = recent_changes_resp['query']['recentchanges']
|
|
||||||
recent_changes.reverse()
|
|
||||||
except aiohttp.ContentTypeError:
|
except aiohttp.ContentTypeError:
|
||||||
logger.exception("Wiki seems to be resulting in non-json content.")
|
logger.exception("Wiki seems to be resulting in non-json content.")
|
||||||
await local_wiki.fail_add(queued_wiki.url, 410)
|
await local_wiki.fail_add(queued_wiki.url, 410)
|
||||||
|
@ -236,6 +234,12 @@ async def scan_group(group: str):
|
||||||
except:
|
except:
|
||||||
logger.exception("On loading json of response.")
|
logger.exception("On loading json of response.")
|
||||||
continue
|
continue
|
||||||
|
try:
|
||||||
|
recent_changes = recent_changes_resp['query']['recentchanges']
|
||||||
|
recent_changes.reverse()
|
||||||
|
except KeyError:
|
||||||
|
logger.error("recent_changes_resp returned KeyError. skipping this check. (usually this happens when the wiki doesn't respond properly, it's pretty normal)")
|
||||||
|
continue
|
||||||
if extended:
|
if extended:
|
||||||
await process_mwmsgs(recent_changes_resp, local_wiki, mw_msgs)
|
await process_mwmsgs(recent_changes_resp, local_wiki, mw_msgs)
|
||||||
if local_wiki.rc_active in (0, None, -1): # new wiki, just get the last rc to not spam the channel, -1 for -1 to NULL changes
|
if local_wiki.rc_active in (0, None, -1): # new wiki, just get the last rc to not spam the channel, -1 for -1 to NULL changes
|
||||||
|
|
Loading…
Reference in a new issue