mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Added more debug and function signatures
This commit is contained in:
parent
366a83aba1
commit
8bd861b84c
|
@ -19,6 +19,8 @@ from src.argparser import command_line_args
|
|||
from src.discord.message import DiscordMessageMetadata, DiscordMessage
|
||||
from typing import TYPE_CHECKING, Optional
|
||||
|
||||
from src.statistics import LogType, Log
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from src.domain import Domain
|
||||
from src.wiki import Wiki, Settings
|
||||
|
@ -43,10 +45,12 @@ class Discussions:
|
|||
if wiki is None:
|
||||
logger.error(f"Could not find a wiki with URL {wiki_url} in the domain group!")
|
||||
continue
|
||||
wiki.statistics.update(Log(type=LogType.SCAN_REASON, title="Discussion scan due to IRC"))
|
||||
await self.run_discussion_scan(wiki)
|
||||
|
||||
for wiki in self.filter_and_sort():
|
||||
if (int(time.time()) - (wiki.statistics.last_checked_discussion or 0)) > settings.get("irc_overtime", 3600):
|
||||
wiki.statistics.update(Log(type=LogType.SCAN_REASON, title="Discussion scan due to overtime"))
|
||||
await self.run_discussion_scan(wiki)
|
||||
else:
|
||||
break # Recently scanned wikis will get at the end of the self.wikis, so we assume what is first hasn't been checked for a while
|
||||
|
|
|
@ -44,7 +44,7 @@ class LinkParser(HTMLParser):
|
|||
new_string = ""
|
||||
recent_href = ""
|
||||
|
||||
def __init__(self, DOMAIN_URL):
|
||||
def __init__(self, DOMAIN_URL: str):
|
||||
self.WIKI_JUST_DOMAIN = DOMAIN_URL
|
||||
super().__init__()
|
||||
|
||||
|
|
Loading…
Reference in a new issue