wrote 4 lines for discussions, after a long break <3

This commit is contained in:
Frisk 2021-02-02 02:28:14 +01:00
parent 48bf9dd540
commit d7b16e9e07
No known key found for this signature in database
GPG key ID: 213F7C15068AF8AC

View file

@ -381,6 +381,10 @@ async def discussion_handler():
fetch_all = db_cursor.execute( fetch_all = db_cursor.execute(
"SELECT wiki, rcid, postid FROM rcgcdw WHERE postid != '-1' OR postid IS NULL GROUP BY wiki") "SELECT wiki, rcid, postid FROM rcgcdw WHERE postid != '-1' OR postid IS NULL GROUP BY wiki")
for db_wiki in fetch_all.fetchall(): for db_wiki in fetch_all.fetchall():
if db_wiki["wiki"] not in rcqueue.irc_mapping["fandom.com"].updated_discussions and all_wikis[db_wiki["wiki"]].last_updated+settings["irc_overtime"] > time.time(): # I swear if another wiki farm ever starts using Fandom discussions I'm gonna use explosion magic
continue
else:
rcqueue.irc_mapping["fandom.com"].updated_discussions.remove(db_wiki["wiki"])
header = settings["header"] header = settings["header"]
header["Accept"] = "application/hal+json" header["Accept"] = "application/hal+json"
async with aiohttp.ClientSession(headers=header, async with aiohttp.ClientSession(headers=header,