mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2026-05-10 18:57:56 +08:00
fix interlog, add chromium to img, fix #20
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user