PaiGram/plugins/job_queue.py
deepsource-autofix[bot] f3c2d701aa Remove unused imports
2022-06-03 15:59:56 +08:00

31 lines
996 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from typing import List
from telegram.ext import CallbackContext
from logger import Log
from plugins.base import BasePlugins
from service import BaseService
class JobQueue(BasePlugins):
def __init__(self, service: BaseService):
super().__init__(service)
self.new_post_id_list_cache: List[int] = []
async def start_job(self, _: CallbackContext) -> None:
Log.info("初始Job启动成功正在初始化必要任务")
Log.info("正在初始化浏览器")
try:
await self.service.template.get_browser()
except TimeoutError as err:
Log.error("初始化浏览器超时,请检查日记查看错误 \n", err)
except AttributeError as err:
Log.error("初始化浏览器时变量为空,请检查日记查看错误 \n", err)
else:
Log.info("初始化浏览器成功")
Log.info("初始化Job成功")
async def check_cookie(self, _: CallbackContext):
pass