Media_RPA/var.py
l0tk3 76bd37dd11
Some checks are pending
/ A job to automate contrib in readme (push) Waiting to run
first commit
2024-07-15 16:33:05 +08:00

13 lines
544 B
Python

from asyncio.tasks import Task
from contextvars import ContextVar
from typing import List
import aiomysql
from async_db import AsyncMysqlDB
request_keyword_var: ContextVar[str] = ContextVar("request_keyword", default="")
crawler_type_var: ContextVar[str] = ContextVar("crawler_type", default="")
comment_tasks_var: ContextVar[List[Task]] = ContextVar("comment_tasks", default=[])
media_crawler_db_var: ContextVar[AsyncMysqlDB] = ContextVar("media_crawler_db_var")
db_conn_pool_var: ContextVar[aiomysql.Pool] = ContextVar("db_conn_pool_var")