This commit is contained in:
Frisk 2020-08-11 02:48:06 +02:00
parent acf19eee1a
commit 8c81ef2032
No known key found for this signature in database
GPG key ID: 213F7C15068AF8AC

View file

@ -105,7 +105,7 @@ class RcQueue:
@staticmethod @staticmethod
def filter_rc_active(wiki_obj): def filter_rc_active(wiki_obj):
return wiki_obj[1].rc_active > -1 return wiki_obj[1].rc_active is None or wiki_obj[1].rc_active > -1
async def update_queues(self): async def update_queues(self):
"""Makes a round on rcgcdw DB and looks for updates to the queues in self.domain_list""" """Makes a round on rcgcdw DB and looks for updates to the queues in self.domain_list"""
@ -235,7 +235,7 @@ async def scan_group(group: str):
continue 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 == 0: # new wiki, just get the last rc to not spam the channel if local_wiki.rc_active in (0, None): # new wiki, just get the last rc to not spam the channel
if len(recent_changes) > 0: if len(recent_changes) > 0:
local_wiki.rc_active = recent_changes[-1]["rcid"] local_wiki.rc_active = recent_changes[-1]["rcid"]
DBHandler.add(queued_wiki.url, recent_changes[-1]["rcid"]) DBHandler.add(queued_wiki.url, recent_changes[-1]["rcid"])