fix interlog, add chromium to img, fix #20

This commit is contained in:
felinae98
2021-12-30 00:34:46 +08:00
parent b9ee2232f5
commit 7728615f56
9 changed files with 189 additions and 80 deletions
+1
View File
@@ -105,6 +105,7 @@ class Config(metaclass=Singleton):
self.user_target.update({"subs": subs}, query)
else:
raise NoSuchUserException()
self.update_send_cache()
def update_send_cache(self):
res = {target_type: defaultdict(list) for target_type in supported_target_type}
+1
View File
@@ -63,6 +63,7 @@ class Render(metaclass=Singleton):
async def render(self, url: str, viewport: Optional[dict] = None, target: Optional[str] = None,
operation: Optional[Callable[[Page], Awaitable[None]]] = None) -> Optional[bytes]:
retry_times = 0
self.interval_log = ''
while retry_times < 3:
try:
return await asyncio.wait_for(self.do_render(url, viewport, target, operation), 20)